From be6ef203aafd52fce532c8dae47be75f1d5252a0 Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Tue, 22 Jul 2014 11:02:10 +0100 Subject: mesa: Add MESA_FORMAT_{A8R8G8B8, X8R8G8B8, X8B8G8R8}_SRGB (v2) This means that each 8888 SRGB format has a reversed counterpart, which is necessary for handling big-endian mesa<->gallium mappings. v2: fix missing i965 additions. (Jason) fix 127->255 max alpha for SRGB formats. (Jason) v1: Reviewed-by: Jason Ekstrand Signed-off-by: Richard Sandiford Signed-off-by: Dave Airlie --- src/mesa/drivers/dri/i965/brw_surface_formats.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/mesa/drivers/dri') diff --git a/src/mesa/drivers/dri/i965/brw_surface_formats.c b/src/mesa/drivers/dri/i965/brw_surface_formats.c index b726c273fda..5407ef65576 100644 --- a/src/mesa/drivers/dri/i965/brw_surface_formats.c +++ b/src/mesa/drivers/dri/i965/brw_surface_formats.c @@ -368,7 +368,9 @@ brw_format_for_mesa_format(mesa_format mesa_format) [MESA_FORMAT_BGR_SRGB8] = 0, [MESA_FORMAT_A8B8G8R8_SRGB] = 0, [MESA_FORMAT_B8G8R8A8_SRGB] = BRW_SURFACEFORMAT_B8G8R8A8_UNORM_SRGB, + [MESA_FORMAT_A8R8G8B8_SRGB] = 0, [MESA_FORMAT_R8G8B8A8_SRGB] = BRW_SURFACEFORMAT_R8G8B8A8_UNORM_SRGB, + [MESA_FORMAT_X8R8G8B8_SRGB] = 0, [MESA_FORMAT_L_SRGB8] = BRW_SURFACEFORMAT_L8_UNORM_SRGB, [MESA_FORMAT_L8A8_SRGB] = BRW_SURFACEFORMAT_L8A8_UNORM_SRGB, [MESA_FORMAT_A8L8_SRGB] = 0, @@ -517,6 +519,7 @@ brw_format_for_mesa_format(mesa_format mesa_format) [MESA_FORMAT_B5G5R5X1_UNORM] = BRW_SURFACEFORMAT_B5G5R5X1_UNORM, [MESA_FORMAT_R8G8B8X8_SNORM] = 0, [MESA_FORMAT_R8G8B8X8_SRGB] = 0, + [MESA_FORMAT_X8B8G8R8_SRGB] = 0, [MESA_FORMAT_RGBX_UINT8] = 0, [MESA_FORMAT_RGBX_SINT8] = 0, [MESA_FORMAT_B10G10R10X2_UNORM] = BRW_SURFACEFORMAT_B10G10R10X2_UNORM, -- cgit v1.2.3