[Mesa-dev] [RFC PATCH 8/8] mesa/main: Expose EXT_sRGB_write_control
Gert Wollny
gw.fossdev at gmail.com
Tue Nov 13 17:27:48 UTC 2018
From: Gert Wollny <gert.wollny at collabora.com>
Use EXT_framebuffer_sRGB to expose EXT_sRGB_write_control on GLES. Remove
the checks for desktion GL in the enable calls, since EXT_framebuffer_sRGB
now also indicates support for switching the linear-sRGB color
space conversion on GLES.
Thanks to Ilia Mirkin for all the helpful discussions that helped to rework
this series.
Signed-off-by: Gert Wollny <gert.wollny at collabora.com>
---
src/mesa/main/enable.c | 4 ----
src/mesa/main/extensions_table.h | 1 +
src/mesa/main/get_hash_params.py | 4 +++-
3 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
index bd3e493da5..d03ffc9d80 100644
--- a/src/mesa/main/enable.c
+++ b/src/mesa/main/enable.c
@@ -1125,8 +1125,6 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
/* GL3.0 - GL_framebuffer_sRGB */
case GL_FRAMEBUFFER_SRGB_EXT:
- if (!_mesa_is_desktop_gl(ctx))
- goto invalid_enum_error;
CHECK_EXTENSION(EXT_framebuffer_sRGB, cap);
_mesa_set_framebuffer_srgb(ctx, state);
return;
@@ -1765,8 +1763,6 @@ _mesa_IsEnabled( GLenum cap )
/* GL3.0 - GL_framebuffer_sRGB */
case GL_FRAMEBUFFER_SRGB_EXT:
- if (!_mesa_is_desktop_gl(ctx))
- goto invalid_enum_error;
CHECK_EXTENSION(EXT_framebuffer_sRGB);
return ctx->Color.sRGBEnabled;
diff --git a/src/mesa/main/extensions_table.h b/src/mesa/main/extensions_table.h
index a516a1b17f..ea9f54ecdc 100644
--- a/src/mesa/main/extensions_table.h
+++ b/src/mesa/main/extensions_table.h
@@ -266,6 +266,7 @@ EXT(EXT_shader_integer_mix , EXT_shader_integer_mix
EXT(EXT_shader_io_blocks , dummy_true , x , x , x , 31, 2014)
EXT(EXT_shader_samples_identical , EXT_shader_samples_identical , GLL, GLC, x , 31, 2015)
EXT(EXT_shadow_funcs , ARB_shadow , GLL, x , x , x , 2002)
+EXT(EXT_sRGB_write_control , EXT_framebuffer_sRGB , x, x , x , 30, 2013)
EXT(EXT_stencil_two_side , EXT_stencil_two_side , GLL, x , x , x , 2001)
EXT(EXT_stencil_wrap , dummy_true , GLL, x , x , x , 2002)
EXT(EXT_subtexture , dummy_true , GLL, x , x , x , 1995)
diff --git a/src/mesa/main/get_hash_params.py b/src/mesa/main/get_hash_params.py
index 1840db6ebb..8de634e90a 100644
--- a/src/mesa/main/get_hash_params.py
+++ b/src/mesa/main/get_hash_params.py
@@ -463,6 +463,9 @@ descriptor=[
[ "MIN_FRAGMENT_INTERPOLATION_OFFSET", "CONTEXT_FLOAT(Const.MinFragmentInterpolationOffset), extra_ARB_gpu_shader5_or_OES_sample_variables" ],
[ "MAX_FRAGMENT_INTERPOLATION_OFFSET", "CONTEXT_FLOAT(Const.MaxFragmentInterpolationOffset), extra_ARB_gpu_shader5_or_OES_sample_variables" ],
[ "FRAGMENT_INTERPOLATION_OFFSET_BITS", "CONST(FRAGMENT_INTERPOLATION_OFFSET_BITS), extra_ARB_gpu_shader5_or_OES_sample_variables" ],
+
+# GL_EXT_framebuffer_EXT / GLES 3.0 + EXT_sRGB_write_control
+ [ "FRAMEBUFFER_SRGB_EXT", "CONTEXT_BOOL(Color.sRGBEnabled), extra_EXT_framebuffer_sRGB" ],
]},
{ "apis": ["GLES", "GLES2"], "params": [
@@ -934,7 +937,6 @@ descriptor=[
[ "RGBA_FLOAT_MODE_ARB", "BUFFER_FIELD(Visual.floatMode, TYPE_BOOLEAN), extra_core_ARB_color_buffer_float_and_new_buffers" ],
# GL3.0 / GL_EXT_framebuffer_sRGB
- [ "FRAMEBUFFER_SRGB_EXT", "CONTEXT_BOOL(Color.sRGBEnabled), extra_EXT_framebuffer_sRGB" ],
[ "FRAMEBUFFER_SRGB_CAPABLE_EXT", "BUFFER_INT(Visual.sRGBCapable), extra_EXT_framebuffer_sRGB_and_new_buffers" ],
# GL 3.1
--
2.18.1
More information about the mesa-dev
mailing list