summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2012-10-25 15:47:12 +0100
committerJosé Fonseca <jfonseca@vmware.com>2012-10-25 17:57:57 +0100
commit0cb0c38ccea84ab524d10447585000d41fbb8c74 (patch)
treee622d054d016acbcfae8f6634c24c6bef26f0271
parent4efcdd1e7a187c3493628fe1a8067a1defe86f9d (diff)
mesa/st: Don't use 4bits for GL_UNSIGNED_BYTE_3_3_2(_REV)
4bits and 3bits quantitization values differ significantly for values other than 0 and 1. Fixes piglit draw-pixels for softpipe/llvmpipe. NOTE: Probably a candidate for stable branches. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Marek Olšák <maraeo@gmail.com>
-rw-r--r--src/mesa/state_tracker/st_cb_drawpixels.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c
index 4e2edd2e7fd..642011488cd 100644
--- a/src/mesa/state_tracker/st_cb_drawpixels.c
+++ b/src/mesa/state_tracker/st_cb_drawpixels.c
@@ -396,6 +396,8 @@ 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:
+ return GL_R3_G3_B2;
+
case GL_UNSIGNED_SHORT_4_4_4_4:
case GL_UNSIGNED_SHORT_4_4_4_4_REV:
return GL_RGBA4;