diff options
author | marha <marha@users.sourceforge.net> | 2011-03-10 09:49:29 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-03-10 09:49:29 +0000 |
commit | f81bb3160c5f39d8f7ad329e99865af88f02b96a (patch) | |
tree | e12e90b1707bed3f4fdd6a3901f4cbcbe76d0b34 /mesalib/src/mesa/main/teximage.c | |
parent | 8c74e7257ed453143c53086f884f6c6ff585379a (diff) | |
download | vcxsrv-f81bb3160c5f39d8f7ad329e99865af88f02b96a.tar.gz vcxsrv-f81bb3160c5f39d8f7ad329e99865af88f02b96a.tar.bz2 vcxsrv-f81bb3160c5f39d8f7ad329e99865af88f02b96a.zip |
xserver mesa git update 10 Mar 2011
Diffstat (limited to 'mesalib/src/mesa/main/teximage.c')
-rw-r--r-- | mesalib/src/mesa/main/teximage.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/mesalib/src/mesa/main/teximage.c b/mesalib/src/mesa/main/teximage.c index d4ae6dd69..2a3037f61 100644 --- a/mesalib/src/mesa/main/teximage.c +++ b/mesalib/src/mesa/main/teximage.c @@ -509,6 +509,28 @@ _mesa_base_tex_format( struct gl_context *ctx, GLint internalFormat ) } } + if (ctx->Extensions.EXT_texture_compression_latc) { + switch (internalFormat) { + case GL_COMPRESSED_LUMINANCE_LATC1_EXT: + case GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT: + return GL_LUMINANCE; + case GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT: + case GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT: + return GL_LUMINANCE_ALPHA; + default: + ; /* fallthrough */ + } + } + + if (ctx->Extensions.ATI_texture_compression_3dc) { + switch (internalFormat) { + case GL_COMPRESSED_LUMINANCE_ALPHA_3DC_ATI: + return GL_LUMINANCE_ALPHA; + default: + ; /* fallthrough */ + } + } + return -1; /* error */ } |