aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGert Wollny <[email protected]>2018-11-15 19:01:24 +0100
committerGert Wollny <[email protected]>2018-11-19 08:05:44 +0100
commit78fdc507a37b7174e21412cc0b2f4818dbe6b63f (patch)
treea65ea83f7ca8b2b699279d68365396dc3972c7ab
parentc5363869d4971780401b21bb75083ef2518c12be (diff)
i965: Add support for and expose EXT_texture_sRGB_R8
Emulate MESA_FORMAT_R_SRGB8 by using L8_UNORM_SRGB. This is possible because component swizzling is handled based on the mesa format and, hence, the a r001 swizzling can be used to correct the components. Enables and makes pass (tested on Kabylake) dEQP-GLES31.functional.srgb_texture_decode.skip_decode.sr8.* dEQP-GLES31.functional.texture.filtering.cube_array.formats.sr8* Signed-off-by: Gert Wollny <[email protected]> Acked-by: Eric Engestrom <[email protected]>
-rw-r--r--src/mesa/drivers/dri/i965/brw_surface_formats.c1
-rw-r--r--src/mesa/drivers/dri/i965/intel_extensions.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_surface_formats.c b/src/mesa/drivers/dri/i965/brw_surface_formats.c
index 879cb424533..77476a8c7eb 100644
--- a/src/mesa/drivers/dri/i965/brw_surface_formats.c
+++ b/src/mesa/drivers/dri/i965/brw_surface_formats.c
@@ -67,6 +67,7 @@ brw_isl_format_for_mesa_format(mesa_format mesa_format)
[MESA_FORMAT_B8G8R8A8_SRGB] = ISL_FORMAT_B8G8R8A8_UNORM_SRGB,
[MESA_FORMAT_R8G8B8A8_SRGB] = ISL_FORMAT_R8G8B8A8_UNORM_SRGB,
[MESA_FORMAT_B8G8R8X8_SRGB] = ISL_FORMAT_B8G8R8X8_UNORM_SRGB,
+ [MESA_FORMAT_R_SRGB8] = ISL_FORMAT_L8_UNORM_SRGB,
[MESA_FORMAT_L_SRGB8] = ISL_FORMAT_L8_UNORM_SRGB,
[MESA_FORMAT_L8A8_SRGB] = ISL_FORMAT_L8A8_UNORM_SRGB,
[MESA_FORMAT_SRGB_DXT1] = ISL_FORMAT_BC1_UNORM_SRGB,
diff --git a/src/mesa/drivers/dri/i965/intel_extensions.c b/src/mesa/drivers/dri/i965/intel_extensions.c
index d7e02efb54d..6ec6248a701 100644
--- a/src/mesa/drivers/dri/i965/intel_extensions.c
+++ b/src/mesa/drivers/dri/i965/intel_extensions.c
@@ -113,6 +113,7 @@ intelInitExtensions(struct gl_context *ctx)
ctx->Extensions.EXT_texture_snorm = true;
ctx->Extensions.EXT_texture_sRGB = true;
ctx->Extensions.EXT_texture_sRGB_decode = true;
+ ctx->Extensions.EXT_texture_sRGB_R8 = true;
ctx->Extensions.EXT_texture_swizzle = true;
ctx->Extensions.EXT_texture_type_2_10_10_10_REV = true;
ctx->Extensions.EXT_vertex_array_bgra = true;