From 17e96718946486ef77927fcf3bb299d8bff32b98 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sun, 9 May 2010 19:28:10 -0600 Subject: mesa: added unsigned 16-bit/channel tex format --- src/mesa/main/texformat.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'src/mesa/main/texformat.c') diff --git a/src/mesa/main/texformat.c b/src/mesa/main/texformat.c index 06e6fd92fc..d235485721 100644 --- a/src/mesa/main/texformat.c +++ b/src/mesa/main/texformat.c @@ -61,12 +61,9 @@ _mesa_choose_tex_format( GLcontext *ctx, GLint internalFormat, (void) type; switch (internalFormat) { - /* RGBA formats */ + /* shallow RGBA formats */ case 4: case GL_RGBA: - case GL_RGB10_A2: - case GL_RGBA12: - case GL_RGBA16: case GL_RGBA8: return MESA_FORMAT_RGBA8888; case GL_RGB5_A1: @@ -76,12 +73,15 @@ _mesa_choose_tex_format( GLcontext *ctx, GLint internalFormat, case GL_RGBA4: return MESA_FORMAT_ARGB4444; - /* RGB formats */ + /* deep RGBA formats */ + case GL_RGB10_A2: + case GL_RGBA12: + case GL_RGBA16: + return MESA_FORMAT_RGBA_16; + + /* shallow RGB formats */ case 3: case GL_RGB: - case GL_RGB10: - case GL_RGB12: - case GL_RGB16: case GL_RGB8: return MESA_FORMAT_RGB888; case GL_R3_G3_B2: @@ -91,6 +91,12 @@ _mesa_choose_tex_format( GLcontext *ctx, GLint internalFormat, case GL_RGB5: return MESA_FORMAT_RGB565; + /* deep RGB formats */ + case GL_RGB10: + case GL_RGB12: + case GL_RGB16: + return MESA_FORMAT_RGBA_16; + /* Alpha formats */ case GL_ALPHA: case GL_ALPHA4: -- cgit v1.2.3