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> (cherry picked from commit e7e216b1d3d151acf3fed619bd759692a989b4b4)
This commit is contained in:
parent
9a879a7616
commit
a750f80c6a
@ -52,6 +52,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>
|
||||
@ -812,24 +813,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);
|
||||
|
Loading…
Reference in New Issue
Block a user