[cogl] cogl-1.8.2-lp-no-framebuffer-blit.patch: Disable the subbuffer blit code when running on llvmpipe un

Adam Jackson ajax at fedoraproject.org
Thu Nov 3 18:28:06 UTC 2011


commit 99fb52802707af15e12781734d4c28d3f7ed28fc
Author: Adam Jackson <ajax at redhat.com>
Date:   Thu Nov 3 18:27:14 2011 -0400

    cogl-1.8.2-lp-no-framebuffer-blit.patch: Disable the subbuffer blit code
    when running on llvmpipe until it's unbroken.

 cogl-1.8.2-lp-no-framebuffer-blit.patch |   21 +++++++++++++++++++++
 cogl.spec                               |    8 +++++++-
 2 files changed, 28 insertions(+), 1 deletions(-)
---
diff --git a/cogl-1.8.2-lp-no-framebuffer-blit.patch b/cogl-1.8.2-lp-no-framebuffer-blit.patch
new file mode 100644
index 0000000..c656477
--- /dev/null
+++ b/cogl-1.8.2-lp-no-framebuffer-blit.patch
@@ -0,0 +1,21 @@
+diff -up cogl-1.8.2/cogl/winsys/cogl-winsys-glx.c.jx cogl-1.8.2/cogl/winsys/cogl-winsys-glx.c
+--- cogl-1.8.2/cogl/winsys/cogl-winsys-glx.c.jx	2011-11-03 16:58:15.000000000 -0400
++++ cogl-1.8.2/cogl/winsys/cogl-winsys-glx.c	2011-11-03 17:28:23.313469639 -0400
+@@ -418,8 +418,15 @@ update_winsys_features (CoglContext *con
+                     TRUE);
+ 
+   if (glx_renderer->pf_glXCopySubBuffer || context->glBlitFramebuffer)
+-    COGL_FLAGS_SET (context->winsys_features,
+-                    COGL_WINSYS_FEATURE_SWAP_REGION, TRUE);
++    {
++      /* hack hack hack hack.  llvmpipe's support for both is broken */
++      const GLubyte *renderer = context->glGetString (GL_RENDERER);
++      if (!strstr (renderer, "llvmpipe"))
++	{
++	  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
diff --git a/cogl.spec b/cogl.spec
index 1c0ad33..f858960 100644
--- a/cogl.spec
+++ b/cogl.spec
@@ -1,6 +1,6 @@
 Name:          cogl
 Version:       1.8.2
-Release:       3%{?dist}
+Release:       4%{?dist}
 Summary:       A library for using 3D graphics hardware to draw pretty pictures
 
 Group:         Development/Libraries
@@ -22,6 +22,7 @@ BuildRequires: pango-devel
 BuildRequires: pkgconfig
 
 Patch0: cogl-1.8.2-no-drm-hax.patch
+Patch1: cogl-1.8.2-lp-no-framebuffer-blit.patch
 
 %description
 Cogl is a small open source library for using 3D graphics hardware to draw
@@ -63,6 +64,7 @@ This package contains documentation for %{name}.
 %prep
 %setup -q
 %patch0 -p1 -b .drm
+%patch1 -p1 -b .llvmpipe
 
 %build
 CFLAGS="$RPM_OPT_FLAGS -fPIC"
@@ -99,6 +101,10 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';'
 %{_datadir}/gtk-doc/html/cogl-2.0-experimental
 
 %changelog
+* Thu Nov 03 2011 Adam Jackson <ajax at redhat.com> 1.8.2-4
+- cogl-1.8.2-lp-no-framebuffer-blit.patch: Disable the subbuffer blit code
+  when running on llvmpipe until it's unbroken.
+
 * Tue Nov 01 2011 Adam Jackson <ajax at redhat.com> 1.8.2-3
 - cogl-1.8.2-no-drm-hax.patch: Don't try insane direct DRM vblank wait.
 


More information about the scm-commits mailing list