diff options
author | Stanislav Vorobiov <s.vorobiov@samsung.com> | 2014-01-13 13:37:10 +0400 |
---|---|---|
committer | Stanislav Vorobiov <s.vorobiov@samsung.com> | 2014-01-13 13:37:10 +0400 |
commit | 283b3e29a28a1102a81976f0e1f4ccc6687265f7 (patch) | |
tree | 6ab823da1a9a3a60c18c2423ed8cc6a3b296eb09 /hw | |
parent | 7943d937215cb512b5aab6aa5bfffeb463ea9a9a (diff) | |
download | qemu-283b3e29a28a1102a81976f0e1f4ccc6687265f7.tar.gz qemu-283b3e29a28a1102a81976f0e1f4ccc6687265f7.tar.bz2 qemu-283b3e29a28a1102a81976f0e1f4ccc6687265f7.zip |
YaGL/VIGS: Use GL_UNSIGNED_INT_8_8_8_8_REV instead of GL_UNSIGNED_BYTE
On Mac OS X glReadPixels with GL_UNSIGNED_BYTE may introduce stalls
even when it's used with PBO, so use
GL_UNSIGNED_INT_8_8_8_8_REV - it's the same
thing and it doesn't stall glReadPixels
Change-Id: I40ae1981579b3596f42f9a22604fd3d7fad8e335
Diffstat (limited to 'hw')
-rw-r--r-- | hw/vigs/vigs_gl_backend.c | 2 | ||||
-rw-r--r-- | hw/yagl/yagl_apis/gles/yagl_host_gles_calls.c | 2 | ||||
-rw-r--r-- | hw/yagl/yagl_backends/egl_offscreen/yagl_egl_offscreen_context.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/hw/vigs/vigs_gl_backend.c b/hw/vigs/vigs_gl_backend.c index 1b15747e7f..7529b4b3fd 100644 --- a/hw/vigs/vigs_gl_backend.c +++ b/hw/vigs/vigs_gl_backend.c @@ -774,7 +774,7 @@ static struct vigs_surface *vigs_gl_backend_create_surface(struct vigs_backend * case vigsp_surface_bgra8888: tex_internalformat = GL_RGBA8; tex_format = GL_BGRA; - tex_type = GL_UNSIGNED_BYTE; + tex_type = GL_UNSIGNED_INT_8_8_8_8_REV; break; default: assert(false); diff --git a/hw/yagl/yagl_apis/gles/yagl_host_gles_calls.c b/hw/yagl/yagl_apis/gles/yagl_host_gles_calls.c index 1dfb18fe3f..6fd3426ede 100644 --- a/hw/yagl/yagl_apis/gles/yagl_host_gles_calls.c +++ b/hw/yagl/yagl_apis/gles/yagl_host_gles_calls.c @@ -2013,7 +2013,7 @@ void yagl_host_glUpdateOffscreenImageYAGL(GLuint texture, height, 0, format, - GL_UNSIGNED_BYTE, + GL_UNSIGNED_INT_8_8_8_8_REV, pixels); gles_api_ts->driver->PixelStorei(GL_UNPACK_ALIGNMENT, diff --git a/hw/yagl/yagl_backends/egl_offscreen/yagl_egl_offscreen_context.c b/hw/yagl/yagl_backends/egl_offscreen/yagl_egl_offscreen_context.c index 3b517a1acf..fbfaf47caa 100644 --- a/hw/yagl/yagl_backends/egl_offscreen/yagl_egl_offscreen_context.c +++ b/hw/yagl/yagl_backends/egl_offscreen/yagl_egl_offscreen_context.c @@ -192,7 +192,7 @@ bool yagl_egl_offscreen_context_read_pixels(struct yagl_egl_offscreen_context *c gles_driver->PixelStorei(GL_PACK_ALIGNMENT, 1); gles_driver->ReadPixels(0, 0, - width, height, format, GL_UNSIGNED_BYTE, + width, height, format, GL_UNSIGNED_INT_8_8_8_8_REV, NULL); mapped_pixels = gles_driver->MapBuffer(GL_PIXEL_PACK_BUFFER_ARB, |