Re: [Mesa-dev] [PATCH] Adding support for EXT_sRGB for Opengl ES
Any progress on adding EXT_sRGB support to Mesa? Jacob Lifshay ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] Adding support for EXT_sRGB for Opengl ES
Hi Emil, Emil Velikovwrites: > Hi Harish, > > This seems to have fallen through the cracks, right? Thanks for bringing this up again :) > Keep in mind that I've not checked all the existing code paths - just > skimming through the patch itself. > > s/Adding support for EXT_sRGB for Opengl ES/mesa: add support for GL_EXT_sRGB/ > This was my first patch in mesa, so the rookie mistakes. :) > On 7 April 2017 at 05:20, Harish Krupo wrote: >> This addes support for the GL_EXT_sRGB extension for OpengGL ES 1.0 and >> above. >> With this patch this test passes in dEQP: >> dEQP-GLES2.capability.extensions.uncompressed_texture_formats.GL_EXT_sRGB >> > Having a more comprehensive list [as mentioned by Tapani] would be great here. > X tests, A pass, B fail, C not supported. > >> Signed-off-by: Harish Krupo >> --- >> src/mapi/glapi/gen/es_EXT.xml| 8 >> src/mesa/drivers/dri/i965/intel_extensions.c | 1 + >> src/mesa/main/extensions_table.h | 1 + >> src/mesa/main/fbobject.c | 2 +- >> src/mesa/main/genmipmap.c| 3 +++ >> src/mesa/main/mtypes.h | 1 + >> 6 files changed, 15 insertions(+), 1 deletion(-) >> >> diff --git a/src/mapi/glapi/gen/es_EXT.xml b/src/mapi/glapi/gen/es_EXT.xml >> index 3e705eb409..a6fd7c755a 100644 >> --- a/src/mapi/glapi/gen/es_EXT.xml >> +++ b/src/mapi/glapi/gen/es_EXT.xml >> @@ -795,6 +795,14 @@ >> >> >> >> + >> + > Extension number seems to be 105 > > >> --- a/src/mesa/main/genmipmap.c >> +++ b/src/mesa/main/genmipmap.c >> @@ -96,6 +96,9 @@ >> _mesa_is_valid_generate_texture_mipmap_internalformat(struct gl_context *ctx, >> (_mesa_is_es3_color_renderable(internalformat) && >>_mesa_is_es3_texture_filterable(ctx, internalformat)); >> } >> + else if (!_mesa_is_desktop_gl(ctx) && ctx->Extensions.EXT_sRGB && >> (internalformat == GL_SRGB)) { >> + return GL_INVALID_OPERATION; >> + } > I'm not sure how this would trigger - the function returns bool, thus > the GL_INVALID_OPERATION will be promoted to true. > Yes, this is wrong, will look into it. IIRC, there was some other bigger issue with this extension due to which I was not able to proceed. I will gather all the related information and will ask here. I am sure somebody will be able to help. Thank you Regards Harish Krupo > Hence the caller (generate_texture_mipmap) will continue instead of > flagging an error. > > HTH > Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] Adding support for EXT_sRGB for Opengl ES
Hi Harish, This seems to have fallen through the cracks, right? Keep in mind that I've not checked all the existing code paths - just skimming through the patch itself. s/Adding support for EXT_sRGB for Opengl ES/mesa: add support for GL_EXT_sRGB/ On 7 April 2017 at 05:20, Harish Krupowrote: > This addes support for the GL_EXT_sRGB extension for OpengGL ES 1.0 and above. > With this patch this test passes in dEQP: > dEQP-GLES2.capability.extensions.uncompressed_texture_formats.GL_EXT_sRGB > Having a more comprehensive list [as mentioned by Tapani] would be great here. X tests, A pass, B fail, C not supported. > Signed-off-by: Harish Krupo > --- > src/mapi/glapi/gen/es_EXT.xml| 8 > src/mesa/drivers/dri/i965/intel_extensions.c | 1 + > src/mesa/main/extensions_table.h | 1 + > src/mesa/main/fbobject.c | 2 +- > src/mesa/main/genmipmap.c| 3 +++ > src/mesa/main/mtypes.h | 1 + > 6 files changed, 15 insertions(+), 1 deletion(-) > > diff --git a/src/mapi/glapi/gen/es_EXT.xml b/src/mapi/glapi/gen/es_EXT.xml > index 3e705eb409..a6fd7c755a 100644 > --- a/src/mapi/glapi/gen/es_EXT.xml > +++ b/src/mapi/glapi/gen/es_EXT.xml > @@ -795,6 +795,14 @@ > > > > + > + Extension number seems to be 105 > --- a/src/mesa/main/genmipmap.c > +++ b/src/mesa/main/genmipmap.c > @@ -96,6 +96,9 @@ > _mesa_is_valid_generate_texture_mipmap_internalformat(struct gl_context *ctx, > (_mesa_is_es3_color_renderable(internalformat) && >_mesa_is_es3_texture_filterable(ctx, internalformat)); > } > + else if (!_mesa_is_desktop_gl(ctx) && ctx->Extensions.EXT_sRGB && > (internalformat == GL_SRGB)) { > + return GL_INVALID_OPERATION; > + } I'm not sure how this would trigger - the function returns bool, thus the GL_INVALID_OPERATION will be promoted to true. Hence the caller (generate_texture_mipmap) will continue instead of flagging an error. HTH Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] Adding support for EXT_sRGB for Opengl ES
On 04/07/2017 07:20 AM, Harish Krupo wrote: This addes support for the GL_EXT_sRGB extension for OpengGL ES 1.0 and above. With this patch this test passes in dEQP: dEQP-GLES2.capability.extensions.uncompressed_texture_formats.GL_EXT_sRGB When searching for possible other cases these changes will affect I noticed there are also some sRGB related cases in fbo completeness that regress: please run deqp-gles2 with: --deqp-case=dEQP-GLES2.functional.fbo.completeness*srgb* to see these. Signed-off-by: Harish Krupo--- src/mapi/glapi/gen/es_EXT.xml| 8 src/mesa/drivers/dri/i965/intel_extensions.c | 1 + src/mesa/main/extensions_table.h | 1 + src/mesa/main/fbobject.c | 2 +- src/mesa/main/genmipmap.c| 3 +++ src/mesa/main/mtypes.h | 1 + 6 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/mapi/glapi/gen/es_EXT.xml b/src/mapi/glapi/gen/es_EXT.xml index 3e705eb409..a6fd7c755a 100644 --- a/src/mapi/glapi/gen/es_EXT.xml +++ b/src/mapi/glapi/gen/es_EXT.xml @@ -795,6 +795,14 @@ + + + + + + + + diff --git a/src/mesa/drivers/dri/i965/intel_extensions.c b/src/mesa/drivers/dri/i965/intel_extensions.c index 30f2c37695..2b49e6f8db 100644 --- a/src/mesa/drivers/dri/i965/intel_extensions.c +++ b/src/mesa/drivers/dri/i965/intel_extensions.c @@ -109,6 +109,7 @@ intelInitExtensions(struct gl_context *ctx) ctx->Extensions.EXT_texture_shared_exponent = true; ctx->Extensions.EXT_texture_snorm = true; ctx->Extensions.EXT_texture_sRGB = true; + ctx->Extensions.EXT_sRGB = true; ctx->Extensions.EXT_texture_sRGB_decode = true; ctx->Extensions.EXT_texture_swizzle = true; ctx->Extensions.EXT_vertex_array_bgra = true; diff --git a/src/mesa/main/extensions_table.h b/src/mesa/main/extensions_table.h index ec717912cb..7fde0a3127 100644 --- a/src/mesa/main/extensions_table.h +++ b/src/mesa/main/extensions_table.h @@ -245,6 +245,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, EXT_sRGB , x , x , ES1, ES2, 2011) 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/fbobject.c b/src/mesa/main/fbobject.c index f73a009d62..caa4828111 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -3898,7 +3898,7 @@ _mesa_get_framebuffer_attachment_parameter(struct gl_context *ctx, } } else { - if (ctx->Extensions.EXT_framebuffer_sRGB) { + if (ctx->Extensions.EXT_framebuffer_sRGB || !ctx->Extensions.EXT_sRGB) { *params = _mesa_get_format_color_encoding(att->Renderbuffer->Format); } diff --git a/src/mesa/main/genmipmap.c b/src/mesa/main/genmipmap.c index 6021c026f5..d451ea40be 100644 --- a/src/mesa/main/genmipmap.c +++ b/src/mesa/main/genmipmap.c @@ -96,6 +96,9 @@ _mesa_is_valid_generate_texture_mipmap_internalformat(struct gl_context *ctx, (_mesa_is_es3_color_renderable(internalformat) && _mesa_is_es3_texture_filterable(ctx, internalformat)); } + else if (!_mesa_is_desktop_gl(ctx) && ctx->Extensions.EXT_sRGB && (internalformat == GL_SRGB)) { + return GL_INVALID_OPERATION; + } return (!_mesa_is_enum_format_integer(internalformat) && !_mesa_is_depthstencil_format(internalformat) && diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index be78b96810..b938ed8958 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -3963,6 +3963,7 @@ struct gl_extensions GLboolean EXT_provoking_vertex; GLboolean EXT_shader_integer_mix; GLboolean EXT_shader_samples_identical; + GLboolean EXT_sRGB; GLboolean EXT_stencil_two_side; GLboolean EXT_texture_array; GLboolean EXT_texture_compression_latc; ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [PATCH] Adding support for EXT_sRGB for Opengl ES
This addes support for the GL_EXT_sRGB extension for OpengGL ES 1.0 and above. With this patch this test passes in dEQP: dEQP-GLES2.capability.extensions.uncompressed_texture_formats.GL_EXT_sRGB Signed-off-by: Harish Krupo--- src/mapi/glapi/gen/es_EXT.xml| 8 src/mesa/drivers/dri/i965/intel_extensions.c | 1 + src/mesa/main/extensions_table.h | 1 + src/mesa/main/fbobject.c | 2 +- src/mesa/main/genmipmap.c| 3 +++ src/mesa/main/mtypes.h | 1 + 6 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/mapi/glapi/gen/es_EXT.xml b/src/mapi/glapi/gen/es_EXT.xml index 3e705eb409..a6fd7c755a 100644 --- a/src/mapi/glapi/gen/es_EXT.xml +++ b/src/mapi/glapi/gen/es_EXT.xml @@ -795,6 +795,14 @@ + + + + + + + + diff --git a/src/mesa/drivers/dri/i965/intel_extensions.c b/src/mesa/drivers/dri/i965/intel_extensions.c index 30f2c37695..2b49e6f8db 100644 --- a/src/mesa/drivers/dri/i965/intel_extensions.c +++ b/src/mesa/drivers/dri/i965/intel_extensions.c @@ -109,6 +109,7 @@ intelInitExtensions(struct gl_context *ctx) ctx->Extensions.EXT_texture_shared_exponent = true; ctx->Extensions.EXT_texture_snorm = true; ctx->Extensions.EXT_texture_sRGB = true; + ctx->Extensions.EXT_sRGB = true; ctx->Extensions.EXT_texture_sRGB_decode = true; ctx->Extensions.EXT_texture_swizzle = true; ctx->Extensions.EXT_vertex_array_bgra = true; diff --git a/src/mesa/main/extensions_table.h b/src/mesa/main/extensions_table.h index ec717912cb..7fde0a3127 100644 --- a/src/mesa/main/extensions_table.h +++ b/src/mesa/main/extensions_table.h @@ -245,6 +245,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, EXT_sRGB , x , x , ES1, ES2, 2011) 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/fbobject.c b/src/mesa/main/fbobject.c index f73a009d62..caa4828111 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -3898,7 +3898,7 @@ _mesa_get_framebuffer_attachment_parameter(struct gl_context *ctx, } } else { - if (ctx->Extensions.EXT_framebuffer_sRGB) { + if (ctx->Extensions.EXT_framebuffer_sRGB || !ctx->Extensions.EXT_sRGB) { *params = _mesa_get_format_color_encoding(att->Renderbuffer->Format); } diff --git a/src/mesa/main/genmipmap.c b/src/mesa/main/genmipmap.c index 6021c026f5..d451ea40be 100644 --- a/src/mesa/main/genmipmap.c +++ b/src/mesa/main/genmipmap.c @@ -96,6 +96,9 @@ _mesa_is_valid_generate_texture_mipmap_internalformat(struct gl_context *ctx, (_mesa_is_es3_color_renderable(internalformat) && _mesa_is_es3_texture_filterable(ctx, internalformat)); } + else if (!_mesa_is_desktop_gl(ctx) && ctx->Extensions.EXT_sRGB && (internalformat == GL_SRGB)) { + return GL_INVALID_OPERATION; + } return (!_mesa_is_enum_format_integer(internalformat) && !_mesa_is_depthstencil_format(internalformat) && diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index be78b96810..b938ed8958 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -3963,6 +3963,7 @@ struct gl_extensions GLboolean EXT_provoking_vertex; GLboolean EXT_shader_integer_mix; GLboolean EXT_shader_samples_identical; + GLboolean EXT_sRGB; GLboolean EXT_stencil_two_side; GLboolean EXT_texture_array; GLboolean EXT_texture_compression_latc; -- 2.11.0 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev