mesa: Add fallback from RGB_FLOAT16 to RGBA_FLOAT16 before RGBA_FLOAT32.

Not all i965 hardware can do RGB float16, and this will at least save
half the memory and have expected behavior in terms of precision.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Eric Anholt
2011-11-06 18:08:36 -08:00
parent 2d159e6b36
commit babe26b3ef

View File

@@ -356,6 +356,7 @@ _mesa_choose_tex_format( struct gl_context *ctx, GLint internalFormat,
break;
case GL_RGB16F_ARB:
RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_FLOAT16);
RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT16);
RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_FLOAT32);
RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FLOAT32);
break;