From: Alex Galakhov Date: Mon, 19 Dec 2011 14:40:07 +0000 (-0700) Subject: osmesa: fix RGB565 rendering X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d334a0fb8cbb368c337858b16cb567a28a35f688;p=mesa.git osmesa: fix RGB565 rendering Signed-off-by: Brian Paul --- diff --git a/src/mesa/drivers/osmesa/osmesa.c b/src/mesa/drivers/osmesa/osmesa.c index ecb7c63dab4..0e062f4fe60 100644 --- a/src/mesa/drivers/osmesa/osmesa.c +++ b/src/mesa/drivers/osmesa/osmesa.c @@ -989,6 +989,10 @@ new_osmesa_renderbuffer(struct gl_context *ctx, GLenum format, GLenum type) case GL_UNSIGNED_SHORT: rb->Format = MESA_FORMAT_RGBA_16; break; + case GL_UNSIGNED_SHORT_5_6_5: + rb->Format = MESA_FORMAT_RGB565; + type = GL_UNSIGNED_BYTE; + break; case GL_FLOAT: rb->Format = MESA_FORMAT_RGBA_FLOAT32; break;