aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/texformat.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-04-27 06:58:32 +0000
committermarha <marha@users.sourceforge.net>2011-04-27 06:58:32 +0000
commit96d6df5da9cddedf4931bf8e17f96e242467c661 (patch)
tree07977c913b04e80b7dbd302e7a5890422aeacb1b /mesalib/src/mesa/main/texformat.c
parent71372d36e1a3f0230b88808f70d35446fda12260 (diff)
downloadvcxsrv-96d6df5da9cddedf4931bf8e17f96e242467c661.tar.gz
vcxsrv-96d6df5da9cddedf4931bf8e17f96e242467c661.tar.bz2
vcxsrv-96d6df5da9cddedf4931bf8e17f96e242467c661.zip
xserver libX11 libxtrans mesa pixman xkeyboard-config git update 27 Apr 2011
Diffstat (limited to 'mesalib/src/mesa/main/texformat.c')
-rw-r--r--mesalib/src/mesa/main/texformat.c42
1 files changed, 38 insertions, 4 deletions
diff --git a/mesalib/src/mesa/main/texformat.c b/mesalib/src/mesa/main/texformat.c
index 97b905fd3..cbebec9aa 100644
--- a/mesalib/src/mesa/main/texformat.c
+++ b/mesalib/src/mesa/main/texformat.c
@@ -327,36 +327,52 @@ _mesa_choose_tex_format( struct gl_context *ctx, GLint internalFormat,
switch (internalFormat) {
case GL_ALPHA16F_ARB:
RETURN_IF_SUPPORTED(MESA_FORMAT_ALPHA_FLOAT16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_ALPHA_FLOAT32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32);
break;
case GL_ALPHA32F_ARB:
RETURN_IF_SUPPORTED(MESA_FORMAT_ALPHA_FLOAT32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32);
break;
case GL_LUMINANCE16F_ARB:
RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_FLOAT16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_FLOAT32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32);
break;
case GL_LUMINANCE32F_ARB:
RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_FLOAT32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32);
break;
case GL_LUMINANCE_ALPHA16F_ARB:
RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32);
break;
case GL_LUMINANCE_ALPHA32F_ARB:
RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32);
break;
case GL_INTENSITY16F_ARB:
RETURN_IF_SUPPORTED(MESA_FORMAT_INTENSITY_FLOAT16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_INTENSITY_FLOAT32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32);
break;
case GL_INTENSITY32F_ARB:
RETURN_IF_SUPPORTED(MESA_FORMAT_INTENSITY_FLOAT32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32);
break;
case GL_RGB16F_ARB:
RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_FLOAT16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_FLOAT32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32);
break;
case GL_RGB32F_ARB:
RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_FLOAT32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32);
break;
case GL_RGBA16F_ARB:
RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32);
break;
case GL_RGBA32F_ARB:
RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32);
@@ -605,7 +621,11 @@ _mesa_choose_tex_format( struct gl_context *ctx, GLint internalFormat,
switch (internalFormat) {
case GL_R8:
case GL_RED:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_R8);
+ break;
+
case GL_COMPRESSED_RED:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RED_RGTC1);
RETURN_IF_SUPPORTED(MESA_FORMAT_R8);
break;
@@ -615,7 +635,11 @@ _mesa_choose_tex_format( struct gl_context *ctx, GLint internalFormat,
case GL_RG:
case GL_RG8:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RG88);
+ break;
+
case GL_COMPRESSED_RG:
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RG_RGTC2);
RETURN_IF_SUPPORTED(MESA_FORMAT_RG88);
break;
@@ -631,13 +655,23 @@ _mesa_choose_tex_format( struct gl_context *ctx, GLint internalFormat,
if (ctx->Extensions.ARB_texture_rg && ctx->Extensions.ARB_texture_float) {
switch (internalFormat) {
case GL_R16F:
- return MESA_FORMAT_R_FLOAT16;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_R_FLOAT16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_R_FLOAT32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32);
+ break;
case GL_R32F:
- return MESA_FORMAT_R_FLOAT32;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_R_FLOAT32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32);
+ break;
case GL_RG16F:
- return MESA_FORMAT_RG_FLOAT16;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RG_FLOAT16);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RG_FLOAT32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32);
+ break;
case GL_RG32F:
- return MESA_FORMAT_RG_FLOAT32;
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RG_FLOAT32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32);
+ break;
default:
; /* fallthrough */