diff options
author | Adel Gadllah <adel.gadllah@gmail.com> | 2014-01-06 15:29:38 +0100 |
---|---|---|
committer | Robert Bragg <robert@linux.intel.com> | 2014-01-06 17:13:07 +0000 |
commit | e7e216b1d3d151acf3fed619bd759692a989b4b4 (patch) | |
tree | 85a0ff53bbc215c50428b5a8608b1f9831ffce1e | |
parent | 55b09f8a939db71ee5ff41afa0ed08cbe937a4ec (diff) | |
download | cogl-e7e216b1d3d151acf3fed619bd759692a989b4b4.tar.gz |
winsys-glx: Reenable swap_region for llvmpipe and swrast
The bug that prevented MESA_copy_sub_buffer to work for swrast /
llvmpipe got fixed in mesa 10.1 git so enable it for mesa 10.1+.
https://bugzilla.gnome.org/show_bug.cgi?id=721450
When landing the patch, it was tweaked to #include "cogl-version.h" to
avoid a compiler warning about COGL_VERSION_ENCODE being implicitly
defined. -- Robert Bragg
Reviewed-by: Robert Bragg <robert@linux.intel.com>
-rw-r--r-- | cogl/winsys/cogl-winsys-glx.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/cogl/winsys/cogl-winsys-glx.c b/cogl/winsys/cogl-winsys-glx.c index 8579cb69..c23f58d5 100644 --- a/cogl/winsys/cogl-winsys-glx.c +++ b/cogl/winsys/cogl-winsys-glx.c @@ -50,6 +50,7 @@ #include "cogl-winsys-glx-private.h" #include "cogl-error-private.h" #include "cogl-poll-private.h" +#include "cogl-version.h" #include <stdlib.h> #include <sys/types.h> @@ -802,24 +803,27 @@ update_winsys_features (CoglContext *context, CoglError **error) if (glx_renderer->glXCopySubBuffer || context->glBlitFramebuffer) { - CoglGpuInfoArchitecture arch; + CoglGpuInfo *info = &context->gpu; + CoglGpuInfoArchitecture arch = info->architecture; - /* 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.) - * + COGL_FLAGS_SET (context->winsys_features, COGL_WINSYS_FEATURE_SWAP_REGION, TRUE); + + /* * "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 + * This is broken in software Mesa at least as of 7.10 and got + * fixed in Mesa 10.1 */ - arch = context->gpu.architecture; - if (arch != COGL_GPU_INFO_ARCHITECTURE_LLVMPIPE && - arch != COGL_GPU_INFO_ARCHITECTURE_SOFTPIPE && - arch != COGL_GPU_INFO_ARCHITECTURE_SWRAST) + + if (info->driver_package == COGL_GPU_INFO_DRIVER_PACKAGE_MESA && + info->driver_package_version < COGL_VERSION_ENCODE (10, 1, 0) && + (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); |