diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2009-06-16 22:32:06 +0100 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2009-06-16 22:32:06 +0100 |
commit | 1acaab0f4bcbcb648167a15a924def801be63979 (patch) | |
tree | 8a4560acdb0077acc48bddfe02cce24e135b231a /meta/packages/qemu | |
parent | 1275962e51a9809be1d6c8702753005197206d72 (diff) | |
download | poky-1acaab0f4bcbcb648167a15a924def801be63979.tar.gz |
qemu: Fix a GL passthrough bug
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/packages/qemu')
-rw-r--r-- | meta/packages/qemu/qemu-git/qemugl-allow-glxcontext-release.patch | 63 | ||||
-rw-r--r-- | meta/packages/qemu/qemu_git.bb | 5 |
2 files changed, 66 insertions, 2 deletions
diff --git a/meta/packages/qemu/qemu-git/qemugl-allow-glxcontext-release.patch b/meta/packages/qemu/qemu-git/qemugl-allow-glxcontext-release.patch new file mode 100644 index 0000000000..979e8afc4c --- /dev/null +++ b/meta/packages/qemu/qemu-git/qemugl-allow-glxcontext-release.patch | |||
@@ -0,0 +1,63 @@ | |||
1 | Allow releasing the GLXContext/Drawable with glXMakeCurrent. | ||
2 | |||
3 | --- | ||
4 | commit d942ed4e853e08d2298f3e11e9a952c1d952bff5 | ||
5 | tree f0a934efd8a8ff48e2d96f0d6fc7d70bef106bfe | ||
6 | parent 93619e6be184f8de08759d347825ee0d678a6f9c | ||
7 | author Andrzej Zaborowski <andrew.zaborowski@intel.com> Tue, 16 Jun 2009 22:22:05 +0200 | ||
8 | committer Andrzej Zaborowski <andrew.zaborowski@intel.com> Tue, 16 Jun 2009 22:22:05 +0200 | ||
9 | |||
10 | target-i386/opengl_exec.c | 31 ++++++++++++++++--------------- | ||
11 | 1 files changed, 16 insertions(+), 15 deletions(-) | ||
12 | |||
13 | diff --git a/target-i386/opengl_exec.c b/target-i386/opengl_exec.c | ||
14 | index 4a69b9b..3d6fb21 100644 | ||
15 | --- a/target-i386/opengl_exec.c | ||
16 | +++ b/target-i386/opengl_exec.c | ||
17 | @@ -1600,10 +1600,9 @@ int do_function_call(int func_number, arg_t *args, char *ret_string) | ||
18 | fprintf(stderr, "client_drawable=%p fake_ctx=%d\n", | ||
19 | (void *) client_drawable, fake_ctxt); | ||
20 | |||
21 | - if (client_drawable == 0 && fake_ctxt == 0) { | ||
22 | + if (client_drawable == 0 && fake_ctxt == 0) | ||
23 | ret_int = glXMakeCurrent(dpy, 0, NULL); | ||
24 | - process->current_state = &process->default_state; | ||
25 | - } else if ((drawable = (GLXDrawable) | ||
26 | + else if ((drawable = (GLXDrawable) | ||
27 | get_association_fakepbuffer_pbuffer( | ||
28 | process, client_drawable))) { | ||
29 | GLXContext ctxt = get_association_fakecontext_glxcontext( | ||
30 | @@ -1651,19 +1650,21 @@ int do_function_call(int func_number, arg_t *args, char *ret_string) | ||
31 | } | ||
32 | |||
33 | if (ret_int) { | ||
34 | - for (i = 0; i < process->nb_states; i ++) { | ||
35 | - if (process->glstates[i]->fake_ctxt == fake_ctxt) { | ||
36 | - /* HACK !!! REMOVE */ | ||
37 | - process->current_state = process->glstates[i]; | ||
38 | - process->current_state->drawable = drawable; | ||
39 | - break; | ||
40 | - } | ||
41 | - } | ||
42 | + if (fake_ctxt) { | ||
43 | + for (i = 0; i < process->nb_states; i ++) | ||
44 | + if (process->glstates[i]->fake_ctxt == fake_ctxt) { | ||
45 | + /* HACK !!! REMOVE */ | ||
46 | + process->current_state = process->glstates[i]; | ||
47 | + process->current_state->drawable = drawable; | ||
48 | + break; | ||
49 | + } | ||
50 | |||
51 | - if (i == process->nb_states) { | ||
52 | - fprintf(stderr, "error remembering the new context\n"); | ||
53 | - exit(-1); | ||
54 | - } | ||
55 | + if (i == process->nb_states) { | ||
56 | + fprintf(stderr, "error remembering the new context\n"); | ||
57 | + exit(-1); | ||
58 | + } | ||
59 | + } else | ||
60 | + process->current_state = &process->default_state; | ||
61 | } | ||
62 | break; | ||
63 | } | ||
diff --git a/meta/packages/qemu/qemu_git.bb b/meta/packages/qemu/qemu_git.bb index bdd18e8fc6..dc640134ed 100644 --- a/meta/packages/qemu/qemu_git.bb +++ b/meta/packages/qemu/qemu_git.bb | |||
@@ -1,7 +1,7 @@ | |||
1 | LICENSE = "GPL" | 1 | LICENSE = "GPL" |
2 | DEPENDS = "zlib" | 2 | DEPENDS = "zlib" |
3 | PV = "0.10.2+git${SRCREV}" | 3 | PV = "0.10.2+git${SRCREV}" |
4 | PR = "r4" | 4 | PR = "r5" |
5 | 5 | ||
6 | FILESPATH = "${FILE_DIRNAME}/qemu-${PV}/:${FILE_DIRNAME}/qemu-git/" | 6 | FILESPATH = "${FILE_DIRNAME}/qemu-${PV}/:${FILE_DIRNAME}/qemu-git/" |
7 | 7 | ||
@@ -12,7 +12,8 @@ SRC_URI = "\ | |||
12 | file://no-strip.patch;patch=1 \ | 12 | file://no-strip.patch;patch=1 \ |
13 | file://fix-dirent.patch;patch=1 \ | 13 | file://fix-dirent.patch;patch=1 \ |
14 | file://fix-nogl.patch;patch=1 \ | 14 | file://fix-nogl.patch;patch=1 \ |
15 | file://zlibsearch.patch;patch=1 " | 15 | file://zlibsearch.patch;patch=1 \ |
16 | file://qemugl-allow-glxcontext-release.patch;patch=1 " | ||
16 | 17 | ||
17 | S = "${WORKDIR}/git" | 18 | S = "${WORKDIR}/git" |
18 | 19 | ||