summaryrefslogtreecommitdiff
path: root/meta/recipes-graphics
diff options
context:
space:
mode:
authorZhai Edwin <edwin.zhai@intel.com>2012-02-28 16:00:49 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-02-28 12:16:41 +0000
commit70c224d80c2330cbb0fa8213b0c0d5a1c87459f6 (patch)
treea7d90de2a81026ea7c2876b32e7f5e43c1aa646c /meta/recipes-graphics
parent5cf9c308756017648692d2559ec5cd432fbd5a5a (diff)
downloadopenembedded-core-70c224d80c2330cbb0fa8213b0c0d5a1c87459f6.tar.gz
openembedded-core-70c224d80c2330cbb0fa8213b0c0d5a1c87459f6.tar.bz2
openembedded-core-70c224d80c2330cbb0fa8213b0c0d5a1c87459f6.tar.xz
openembedded-core-70c224d80c2330cbb0fa8213b0c0d5a1c87459f6.zip
qemugl: Fix gl apps failure on qemu-x86-64
Extend commit 028968 to qemu x86-64, where stack disorder happen due to register handling via push/pop. [YOCTO #1927] fixed Signed-off-by: Zhai Edwin <edwin.zhai@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-graphics')
-rw-r--r--meta/recipes-graphics/mesa/qemugl/call_opengl_fix.patch40
-rw-r--r--meta/recipes-graphics/mesa/qemugl_git.bb2
2 files changed, 39 insertions, 3 deletions
diff --git a/meta/recipes-graphics/mesa/qemugl/call_opengl_fix.patch b/meta/recipes-graphics/mesa/qemugl/call_opengl_fix.patch
index c5e3592a7..342f49b71 100644
--- a/meta/recipes-graphics/mesa/qemugl/call_opengl_fix.patch
+++ b/meta/recipes-graphics/mesa/qemugl/call_opengl_fix.patch
@@ -16,8 +16,8 @@ Upstream-Status: Pending
Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
Index: git/opengl_client.c
===================================================================
---- git.orig/opengl_client.c 2011-09-19 19:44:51.000000000 +0800
-+++ git/opengl_client.c 2011-09-22 10:11:04.000000000 +0800
+--- git.orig/opengl_client.c 2012-02-28 15:26:28.000000000 +0800
++++ git/opengl_client.c 2012-02-28 15:29:18.000000000 +0800
@@ -1076,23 +1076,29 @@
{
#if defined(__i386__)
@@ -56,3 +56,39 @@ Index: git/opengl_client.c
__asm__ ("mov %%eax, %0"::"m"(ret));
#ifdef WIN32
__asm__ ("movl (%%esp),%%ecx;movl %%ecx,%%fs:0;addl $8,%%esp;" : : : "%ecx");
+@@ -1100,20 +1106,27 @@
+ return ret;
+ #elif defined(__x86_64__)
+ int ret;
+- __asm__ ("push %rbx");
+- __asm__ ("push %rcx");
+- __asm__ ("push %rdx");
+- __asm__ ("push %rsi");
++ long bx, cx, dx, si;
++
++ /* save registers before opengl call */
++ __asm__ ("mov %%rbx, %0"::"m"(bx));
++ __asm__ ("mov %%rcx, %0"::"m"(cx));
++ __asm__ ("mov %%rdx, %0"::"m"(dx));
++ __asm__ ("mov %%rsi, %0"::"m"(si));
++
+ __asm__ ("mov %0, %%eax"::"m"(func_number));
+ __asm__ ("mov %0, %%ebx"::"m"(pid));
+ __asm__ ("mov %0, %%rcx"::"m"(ret_string));
+ __asm__ ("mov %0, %%rdx"::"m"(args));
+ __asm__ ("mov %0, %%rsi"::"m"(args_size));
+ __asm__ ("int $0x99");
+- __asm__ ("pop %rsi");
+- __asm__ ("pop %rdx");
+- __asm__ ("pop %rcx");
+- __asm__ ("pop %rbx");
++
++ /* restore registers */
++ __asm__ ("mov %0, %%rbx"::"m"(bx));
++ __asm__ ("mov %0, %%rcx"::"m"(cx));
++ __asm__ ("mov %0, %%rdx"::"m"(dx));
++ __asm__ ("mov %0, %%rsi"::"m"(si));
++
+ __asm__ ("mov %%eax, %0"::"m"(ret));
+ return ret;
+ #else
diff --git a/meta/recipes-graphics/mesa/qemugl_git.bb b/meta/recipes-graphics/mesa/qemugl_git.bb
index e3552eceb..66f4e17be 100644
--- a/meta/recipes-graphics/mesa/qemugl_git.bb
+++ b/meta/recipes-graphics/mesa/qemugl_git.bb
@@ -18,7 +18,7 @@ S = "${WORKDIR}/git"
SRCREV = "d888bbc723c00d197d34a39b5b7448660ec1b1c0"
PV = "0.0+git${SRCPV}"
-PR = "r8"
+PR = "r9"
DEFAULT_PREFERENCE = "-1"