[Mesa-dev] [PATCH] mesa/st: Use more precision for GL_UNSIGNED_BYTE_3_3_2(_REV)
jfonseca at vmware.com
jfonseca at vmware.com
Thu Oct 25 07:47:42 PDT 2012
From: José Fonseca <jfonseca at vmware.com>
4bits and 3bits quantitization values differ significantly for
values other than 0 and 1.
Fixes piglit draw-pixels for softpipe/llvmpipe.
---
src/mesa/state_tracker/st_cb_drawpixels.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c
index 4e2edd2..4532ded 100644
--- a/src/mesa/state_tracker/st_cb_drawpixels.c
+++ b/src/mesa/state_tracker/st_cb_drawpixels.c
@@ -396,6 +396,9 @@ internal_format(struct gl_context *ctx, GLenum format, GLenum type)
case GL_UNSIGNED_BYTE_3_3_2:
case GL_UNSIGNED_BYTE_2_3_3_REV:
+ /* GL_RGBA4 introduces too much error for normalized values */
+ return GL_RGBA8;
+
case GL_UNSIGNED_SHORT_4_4_4_4:
case GL_UNSIGNED_SHORT_4_4_4_4_REV:
return GL_RGBA4;
--
1.7.9.5
More information about the mesa-dev
mailing list