[Mesa-dev] [PATCH] mesa: try RGBA_FLOAT16 before RGBA_FLOAT32 when choosing A, L, LA, I formats
Brian Paul
brianp at vmware.com
Mon Jan 16 09:10:38 PST 2012
To try to use less tex memory and maybe get better performance.
Spotted by Roland Scheidegger.
---
src/mesa/main/texformat.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/mesa/main/texformat.c b/src/mesa/main/texformat.c
index d393873..259eb90 100644
--- a/src/mesa/main/texformat.c
+++ b/src/mesa/main/texformat.c
@@ -323,6 +323,7 @@ _mesa_choose_tex_format( struct gl_context *ctx, GLint 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_FLOAT16);
RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32);
break;
case GL_ALPHA32F_ARB:
@@ -334,6 +335,7 @@ _mesa_choose_tex_format( struct gl_context *ctx, GLint internalFormat,
case GL_LUMINANCE16F_ARB:
RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_FLOAT16);
RETURN_IF_SUPPORTED(MESA_FORMAT_LUMINANCE_FLOAT32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16);
RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32);
break;
case GL_LUMINANCE32F_ARB:
@@ -345,6 +347,7 @@ _mesa_choose_tex_format( struct gl_context *ctx, GLint internalFormat,
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_FLOAT16);
RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32);
break;
case GL_LUMINANCE_ALPHA32F_ARB:
@@ -356,6 +359,7 @@ _mesa_choose_tex_format( struct gl_context *ctx, GLint internalFormat,
case GL_INTENSITY16F_ARB:
RETURN_IF_SUPPORTED(MESA_FORMAT_INTENSITY_FLOAT16);
RETURN_IF_SUPPORTED(MESA_FORMAT_INTENSITY_FLOAT32);
+ RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16);
RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32);
break;
case GL_INTENSITY32F_ARB:
--
1.7.3.4
More information about the mesa-dev
mailing list