]> code.ossystems Code Review - openembedded-core.git/commitdiff
qemugl: Hide some GLX extensions by default
authorZhai Edwin <edwin.zhai@intel.com>
Fri, 16 Mar 2012 11:05:38 +0000 (19:05 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 19 Mar 2012 13:31:31 +0000 (13:31 +0000)
Exporting these extensions make guest call some missing GLX API then crash.
It's hacky to implement these APIs, so hide these extensions as fix.

[YOCTO #1927] got fixed

Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
meta/recipes-graphics/mesa/qemugl/extensions_emulation.patch [new file with mode: 0644]
meta/recipes-graphics/mesa/qemugl_git.bb

diff --git a/meta/recipes-graphics/mesa/qemugl/extensions_emulation.patch b/meta/recipes-graphics/mesa/qemugl/extensions_emulation.patch
new file mode 100644 (file)
index 0000000..08418c2
--- /dev/null
@@ -0,0 +1,34 @@
+Hide some GLX extensions by default to avoid guest call missing GLX API. It's
+hacky to implement these APIs, so hide these extensions as fix.
+
+Upstream-Status: Pending
+
+Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
+
+Index: git/opengl_client.c
+===================================================================
+--- git.orig/opengl_client.c   2012-03-16 18:22:27.000000000 +0800
++++ git/opengl_client.c        2012-03-16 18:52:06.000000000 +0800
+@@ -105,6 +105,12 @@
+   "NO_MOVE",                 /* default : set if TCP/IP communication */
+ };
++/* Hiding some GLX extensions from guest */
++static const char* hiding_extensions =
++  "GLX_MESA_copy_sub_buffer,\
++   GLX_MESA_multithread_makecurrent,\
++   GLX_MESA_swap_control,\
++  ";
+ #ifdef WIN32
+@@ -3516,7 +3522,8 @@
+ static void removeUnwantedExtensions(char* ret)
+ {
+   char* toBeRemoved = getenv("GL_REMOVE_EXTENSIONS");
+-  if (toBeRemoved == NULL) return;
++  if (toBeRemoved == NULL)
++    toBeRemoved = hiding_extensions;
+   toBeRemoved = strdup(toBeRemoved);
+   char* iterToBeRemoved = toBeRemoved;
+   while(*iterToBeRemoved)
index 66f4e17bebe21ad36ad77e89ecb2eb0d238f770a..378aa6550234595007636c0d5f2d55a409d59b2b 100644 (file)
@@ -12,13 +12,14 @@ COMPATIBLE_HOST = '(x86_64.*|i.86.*)-(linux|freebsd.*)'
 SRC_URI = "git://git.yoctoproject.org/qemugl;protocol=git \
            file://versionfix.patch \
            file://remove-x11r6-lib-dir.patch \
-           file://call_opengl_fix.patch"
+           file://call_opengl_fix.patch \
+           file://extensions_emulation.patch"
 S = "${WORKDIR}/git"
 
 SRCREV = "d888bbc723c00d197d34a39b5b7448660ec1b1c0"
 
 PV = "0.0+git${SRCPV}"
-PR = "r9"
+PR = "r10"
 
 DEFAULT_PREFERENCE = "-1"