diff options
author | Gert Wollny <[email protected]> | 2018-11-13 12:36:44 +0100 |
---|---|---|
committer | Gert Wollny <[email protected]> | 2019-01-28 12:18:40 +0100 |
commit | 212c0c630a849e4737e2808a993d708cbb2f18f7 (patch) | |
tree | ec5ec5b8f01bcc0af5ea921d614604348a02b799 | |
parent | 1013dfece1cffa38e9faf6a0fec7fd10711fcb58 (diff) |
mesa/main: Expose EXT_sRGB_write_control
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.
v2: Fix alphabetical listing of extensions (Tapani Pälli)
Signed-off-by: Gert Wollny <[email protected]>
Reviewed-by: Marek Olšák <[email protected]> (v1)
-rw-r--r-- | src/mesa/main/enable.c | 4 | ||||
-rw-r--r-- | src/mesa/main/extensions_table.h | 1 | ||||
-rw-r--r-- | 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 21d6a812e07..b5e59b77751 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; @@ -1764,8 +1762,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 dad38124d57..01c3c9b78e6 100644 --- a/src/mesa/main/extensions_table.h +++ b/src/mesa/main/extensions_table.h @@ -257,6 +257,7 @@ EXT(EXT_read_format_bgra , dummy_true EXT(EXT_render_snorm , EXT_render_snorm , x , x , x, 31, 2014) EXT(EXT_rescale_normal , dummy_true , GLL, x , x , x , 1997) EXT(EXT_robustness , KHR_robustness , x, x, x , ES2, 2011) +EXT(EXT_sRGB_write_control , EXT_framebuffer_sRGB , x, x , x , 30, 2013) EXT(EXT_secondary_color , dummy_true , GLL, x , x , x , 1999) EXT(EXT_semaphore , EXT_semaphore , GLL, GLC, x , ES2, 2017) EXT(EXT_semaphore_fd , EXT_semaphore_fd , GLL, GLC, x , ES2, 2017) diff --git a/src/mesa/main/get_hash_params.py b/src/mesa/main/get_hash_params.py index 0b8ec9ea0bb..8b351bcd2d2 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 |