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 11f2f6ebb4)
This commit is contained in:
Robert Bragg 2012-05-14 15:02:52 +01:00 committed by Neil Roberts
parent 51610c3d58
commit cb5efc1187
5 changed files with 31 additions and 4 deletions

View File

@ -240,8 +240,6 @@ cogl_context_new (CoglDisplay *display,
g_assert_not_reached ();
}
_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

@ -155,6 +155,8 @@ _cogl_gl_update_features (CoglContext *context,
_cogl_get_gl_version (&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

@ -60,6 +60,8 @@ _cogl_gles_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

@ -421,8 +421,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