aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/texformat.c
diff options
context:
space:
mode:
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 99513a222..24c4f1a92 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 */