Workaround drisw bug where clipped redraws don't work

This detects when we are running on any of Mesa's software rasterizer
backends and disables use of glBlitFramebuffer and glXCopySubBuffer.
Both of these currently result in full-screen copies so there's little
point in using these to optimize how much of the screen we present.

To help ensure we re-evaluate this workaround periodically we have added
a comment marker of "ONGOING BUG" above the workaround and added a note
to our RELEASING document that says we should grep for this marker and
write a NEWS section about ongoing bug workarounds.

https://bugzilla.gnome.org/show_bug.cgi?id=674208

Reviewed-by: Neil Roberts <neil@linux.intel.com>

(cherry picked from commit 11f2f6ebb42398978ec8dd92b3c332ae8140a728)
This commit is contained in:
Robert Bragg 2012-05-14 15:02:52 +01:00
parent b8e380edc3
commit a945890de6
5 changed files with 31 additions and 4 deletions

View File

@ -244,8 +244,6 @@ cogl_context_new (CoglDisplay *display,
return NULL;
}
_cogl_gpu_info_init (context, &context->gpu);
context->attribute_name_states_hash =
g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
context->attribute_name_index_map = NULL;

View File

@ -339,6 +339,8 @@ _cogl_driver_update_features (CoglContext *ctx,
_cogl_get_gl_version (ctx, &gl_major, &gl_minor);
_cogl_gpu_info_init (ctx, &ctx->gpu);
flags = (COGL_FEATURE_TEXTURE_READ_PIXELS
| COGL_FEATURE_UNSIGNED_INT_INDICES
| COGL_FEATURE_DEPTH_RANGE);

View File

@ -184,6 +184,8 @@ _cogl_driver_update_features (CoglContext *context,
context->glGetString (GL_VERSION),
context->glGetString (GL_EXTENSIONS));
_cogl_gpu_info_init (context, &context->gpu);
gl_extensions = (const char*) context->glGetString (GL_EXTENSIONS);
_cogl_feature_check_ext_functions (context,

View File

@ -420,8 +420,30 @@ update_winsys_features (CoglContext *context, GError **error)
TRUE);
if (glx_renderer->pf_glXCopySubBuffer || context->glBlitFramebuffer)
COGL_FLAGS_SET (context->winsys_features,
COGL_WINSYS_FEATURE_SWAP_REGION, TRUE);
{
CoglGpuInfoArchitecture arch;
/* XXX: ONGOING BUG:
* (Don't change the line above since we use this to grep for
* un-resolved bug workarounds as part of the release process.)
*
* "The "drisw" binding in Mesa for loading sofware renderers is
* broken, and neither glBlitFramebuffer nor glXCopySubBuffer
* work correctly."
* - ajax
* - https://bugzilla.gnome.org/show_bug.cgi?id=674208
*
* This is broken in software Mesa at least as of 7.10
*/
arch = context->gpu.architecture;
if (arch != COGL_GPU_INFO_ARCHITECTURE_LLVMPIPE &&
arch != COGL_GPU_INFO_ARCHITECTURE_SOFTPIPE &&
arch != COGL_GPU_INFO_ARCHITECTURE_SWRAST)
{
COGL_FLAGS_SET (context->winsys_features,
COGL_WINSYS_FEATURE_SWAP_REGION, TRUE);
}
}
/* Note: glXCopySubBuffer and glBlitFramebuffer won't be throttled
* by the SwapInterval so we have to throttle swap_region requests

View File

@ -52,6 +52,9 @@ When making a new release;
- Use git shortlog -n -s to get the list of authors
- The following bash snippet may help with extracting the list of
bugs closed:
- Grep the source code for "XXX: ONGOING BUG" and add a
section about workarounds for un-resolved upstream bugs.
URLS=$(git log $1|grep bugzilla|sort|uniq)
for i in $URLS