i965: Use native RGB_FLOAT16 support when available.
authorEric Anholt <eric@anholt.net>
Wed, 17 Apr 2013 00:21:22 +0000 (17:21 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 15 May 2013 16:43:46 +0000 (09:43 -0700)
Previously we would expand it to RGBA_FLOAT16.  This format now comes out
as framebuffer incomplete, but it seems worth the memory savings if that's
what people are asking for (and GL3 does list it under "texture-only"
color formats)

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_wm_surface_state.c

index 14216e52152a379f34d72a975779845c9a284e2c..0c977a7b9530efd2bfa1a463726fbe1e290449d7 100644 (file)
@@ -434,7 +434,7 @@ brw_format_for_mesa_format(gl_format mesa_format)
       [MESA_FORMAT_RGBA_FLOAT32] = BRW_SURFACEFORMAT_R32G32B32A32_FLOAT,
       [MESA_FORMAT_RGBA_FLOAT16] = BRW_SURFACEFORMAT_R16G16B16A16_FLOAT,
       [MESA_FORMAT_RGB_FLOAT32] = BRW_SURFACEFORMAT_R32G32B32_FLOAT,
-      [MESA_FORMAT_RGB_FLOAT16] = 0,
+      [MESA_FORMAT_RGB_FLOAT16] = BRW_SURFACEFORMAT_R16G16B16_FLOAT,
       [MESA_FORMAT_ALPHA_FLOAT32] = BRW_SURFACEFORMAT_A32_FLOAT,
       [MESA_FORMAT_ALPHA_FLOAT16] = BRW_SURFACEFORMAT_A16_FLOAT,
       [MESA_FORMAT_LUMINANCE_FLOAT32] = BRW_SURFACEFORMAT_L32_FLOAT,