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
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);
height,
0,
format,
- GL_UNSIGNED_BYTE,
+ GL_UNSIGNED_INT_8_8_8_8_REV,
pixels);
gles_api_ts->driver->PixelStorei(GL_UNPACK_ALIGNMENT,
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,