aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/teximage.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-03-30 07:22:44 +0000
committermarha <marha@users.sourceforge.net>2011-03-30 07:22:44 +0000
commit4e1588b6805ee5c7cd34e733cd1eff098d063b95 (patch)
tree763d6761b0131ecd36be7b0d48d2e644b8a25c95 /mesalib/src/mesa/main/teximage.c
parenta69f20daead874a20fad57a4fadd99df393f28d6 (diff)
parentaee5cfef9a419ee2845d66b0c31e476880bea663 (diff)
downloadvcxsrv-4e1588b6805ee5c7cd34e733cd1eff098d063b95.tar.gz
vcxsrv-4e1588b6805ee5c7cd34e733cd1eff098d063b95.tar.bz2
vcxsrv-4e1588b6805ee5c7cd34e733cd1eff098d063b95.zip
svn merge ^/branches/released .
Diffstat (limited to 'mesalib/src/mesa/main/teximage.c')
-rw-r--r--mesalib/src/mesa/main/teximage.c31
1 files changed, 30 insertions, 1 deletions
diff --git a/mesalib/src/mesa/main/teximage.c b/mesalib/src/mesa/main/teximage.c
index 351dccc16..037cce5c2 100644
--- a/mesalib/src/mesa/main/teximage.c
+++ b/mesalib/src/mesa/main/teximage.c
@@ -311,11 +311,40 @@ _mesa_base_tex_format( struct gl_context *ctx, GLint internalFormat )
}
}
- if (ctx->Extensions.MESA_texture_signed_rgba) {
+ if (ctx->Extensions.EXT_texture_snorm) {
switch (internalFormat) {
+ case GL_RED_SNORM:
+ case GL_R8_SNORM:
+ case GL_R16_SNORM:
+ return GL_RED;
+ case GL_RG_SNORM:
+ case GL_RG8_SNORM:
+ case GL_RG16_SNORM:
+ return GL_RG;
+ case GL_RGB_SNORM:
+ case GL_RGB8_SNORM:
+ case GL_RGB16_SNORM:
+ return GL_RGB;
case GL_RGBA_SNORM:
case GL_RGBA8_SNORM:
+ case GL_RGBA16_SNORM:
return GL_RGBA;
+ case GL_ALPHA_SNORM:
+ case GL_ALPHA8_SNORM:
+ case GL_ALPHA16_SNORM:
+ return GL_ALPHA;
+ case GL_LUMINANCE_SNORM:
+ case GL_LUMINANCE8_SNORM:
+ case GL_LUMINANCE16_SNORM:
+ return GL_LUMINANCE;
+ case GL_LUMINANCE_ALPHA_SNORM:
+ case GL_LUMINANCE8_ALPHA8_SNORM:
+ case GL_LUMINANCE16_ALPHA16_SNORM:
+ return GL_LUMINANCE_ALPHA;
+ case GL_INTENSITY_SNORM:
+ case GL_INTENSITY8_SNORM:
+ case GL_INTENSITY16_SNORM:
+ return GL_INTENSITY;
default:
; /* fallthrough */
}