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 <gert.wollny@collabora.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> (v1)
This commit is contained in:
@@ -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;
|
||||
|
||||
|
@@ -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)
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user