You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/media-libs/cogl/files/cogl-1.12.2-dont-use-MSAA.p...

44 lines
1.5 KiB

From 1f84b5c9b41fb053e7d96b93e3558ca03eed2ae0 Mon Sep 17 00:00:00 2001
From: Jerome Glisse
Date: Tue, 29 Jan 2013 18:37:41 -0500
Subject: [PATCH] glx do not use multisample visual config for front or pixmap
There is no guaranty that glXGetFBConfigs will return fbconfig ordered
with non msaa config first. This patch make sure that non msaa config
get choose.
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Reviewed-by: Robert Bragg <robert@linux.intel.com>
(cherry picked from commit 93b7b4c850dd928bf21ee168a95641a8d631f713)
---
cogl/winsys/cogl-winsys-glx.c | 31 ++++++++++++++++++++++++-------
1 file changed, 24 insertions(+), 7 deletions(-)
commit 8a1353a215ab that removes a hunk as unnecessary is manually removed
from this patchfile instead of reverting in a second patch for Gentoo.
diff --git a/cogl/winsys/cogl-winsys-glx.c b/cogl/winsys/cogl-winsys-glx.c
index 234e9da..24aee14 100644
--- a/cogl/winsys/cogl-winsys-glx.c
+++ b/cogl/winsys/cogl-winsys-glx.c
@@ -2024,6 +2031,16 @@ get_fbconfig_for_depth (CoglContext *context,
if (value != depth && (value - alpha) != depth)
continue;
+ if (glx_renderer->glx_major == 1 && glx_renderer->glx_minor >= 4)
+ {
+ glx_renderer->glXGetFBConfigAttrib (dpy,
+ fbconfigs[i],
+ GLX_SAMPLES,
+ &value);
+ if (value > 1)
+ continue;
+ }
+
value = 0;
if (depth == 32)
{
--
1.8.2.1