From: José Fonseca Date: Thu, 25 Oct 2012 14:47:12 +0000 (+0100) Subject: mesa/st: Don't use 4bits for GL_UNSIGNED_BYTE_3_3_2(_REV) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0cb0c38ccea84ab524d10447585000d41fbb8c74;p=mesa.git 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 Reviewed-by: Marek Olšák --- 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;