summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texformat.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2010-05-09 19:28:10 -0600
committerBrian Paul <[email protected]>2010-05-09 21:19:42 -0600
commit17e96718946486ef77927fcf3bb299d8bff32b98 (patch)
treea906df83adb97e08089023a1c48c36fa81c817bc /src/mesa/main/texformat.c
parent7a57af6d11a8fae9838a0d2e42eac6200b8f027e (diff)
mesa: added unsigned 16-bit/channel tex format
Diffstat (limited to 'src/mesa/main/texformat.c')
-rw-r--r--src/mesa/main/texformat.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/mesa/main/texformat.c b/src/mesa/main/texformat.c
index 06e6fd92fca..d235485721a 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: