[Mesa-dev] [PATCH 1/2] mesa: Add GL_UNSIGNED_BYTE fast-path to fast_read_rgba_pixels_memcpy
Martin Andersson
g02maran at gmail.com
Sun Mar 10 15:05:03 PDT 2013
---
src/mesa/main/readpix.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mesa/main/readpix.c b/src/mesa/main/readpix.c
index 2f130ae..349b0bc 100644
--- a/src/mesa/main/readpix.c
+++ b/src/mesa/main/readpix.c
@@ -238,7 +238,7 @@ fast_read_rgba_pixels_memcpy( struct gl_context *ctx,
}
else if (rb->Format == MESA_FORMAT_XRGB8888 &&
format == GL_BGRA &&
- type == GL_UNSIGNED_INT_8_8_8_8_REV &&
+ (type == GL_UNSIGNED_INT_8_8_8_8_REV || type == GL_UNSIGNED_BYTE) &&
!ctx->Pack.SwapBytes) {
copy_xrgb = GL_TRUE;
}
--
1.8.1.5
More information about the mesa-dev
mailing list