[Mesa-dev] [PATCH] mesa: expose GL_EXT_texture_sRGB_decode on GLES 3.0+
Ilia Mirkin
imirkin at alum.mit.edu
Fri Feb 26 14:30:47 UTC 2016
On Fri, Feb 26, 2016 at 7:27 AM, Samuel Iglesias Gonsálvez
<siglesias at igalia.com> wrote:
> On Fri, Feb 26, 2016 at 01:01:28PM +0100, Samuel Iglesias Gonsálvez wrote:
>> Reviewed-by: Samuel Iglesias Gonsálvez <siglesias at igalia.com>
>>
>
> I forgot one comment... See below.
>
>> On Sat, Feb 20, 2016 at 04:00:49PM -0500, Ilia Mirkin wrote:
>> > Could be exposed on earlier GLES versions if we supported EXT_sRGB, but
>> > we don't, for now.
>> >
>> > Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
>> > ---
>> >
>> > Passes all the relevant dEQP tests (although they only test state, not the
>> > actual decoding... but those bits are mostly ctx-agnostic paths).
>> >
>> > Note that this ext is part of the ANDROID_extension_pack_es31a
>> >
>> > src/mesa/main/extensions_table.h | 2 +-
>> > src/mesa/main/texparam.c | 3 +--
>> > 2 files changed, 2 insertions(+), 3 deletions(-)
>> >
>> > diff --git a/src/mesa/main/extensions_table.h b/src/mesa/main/extensions_table.h
>> > index e4ca2b6..74cb3d8 100644
>> > --- a/src/mesa/main/extensions_table.h
>> > +++ b/src/mesa/main/extensions_table.h
>> > @@ -248,7 +248,7 @@ EXT(EXT_texture_object , dummy_true
>> > EXT(EXT_texture_rectangle , NV_texture_rectangle , GLL, x , x , x , 2004)
>> > EXT(EXT_texture_rg , ARB_texture_rg , x , x , x , ES2, 2011)
>> > EXT(EXT_texture_sRGB , EXT_texture_sRGB , GLL, GLC, x , x , 2004)
>> > -EXT(EXT_texture_sRGB_decode , EXT_texture_sRGB_decode , GLL, GLC, x , x , 2006)
>> > +EXT(EXT_texture_sRGB_decode , EXT_texture_sRGB_decode , GLL, GLC, x , 30, 2006)
>> > EXT(EXT_texture_shared_exponent , EXT_texture_shared_exponent , GLL, GLC, x , x , 2004)
>> > EXT(EXT_texture_snorm , EXT_texture_snorm , GLL, GLC, x , x , 2009)
>> > EXT(EXT_texture_swizzle , EXT_texture_swizzle , GLL, GLC, x , x , 2008)
>> > diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c
>> > index 20770a7..3b769f4 100644
>> > --- a/src/mesa/main/texparam.c
>> > +++ b/src/mesa/main/texparam.c
>> > @@ -568,8 +568,7 @@ set_tex_parameteri(struct gl_context *ctx,
>> > goto invalid_pname;
>> >
>> > case GL_TEXTURE_SRGB_DECODE_EXT:
>> > - if (_mesa_is_desktop_gl(ctx)
>> > - && ctx->Extensions.EXT_texture_sRGB_decode) {
>> > + if (ctx->Extensions.EXT_texture_sRGB_decode) {
>
> Taking another look at it, this line can be changed to be:
>
> if(_mesa_has_EXT_texture_sRGB_decode(ctx))
>
> to take advantage of this API.
I thought about that... the thing is that there are 7 other places
that check for ctx->Extensions.EXT_texture_sRGB_decode, but without
the _mesa_is_desktop_gl check. A separate change to flip all of them
over could make sense, but tbh, seems hardly worth it.
> With or without this change,
>
> Reviewed-by: Samuel Iglesias Gonsálvez <siglesias at igalia.com>
Thanks!
>
>> > GLenum decode = params[0];
>> >
>> > if (!target_allows_setting_sampler_parameters(texObj->Target))
>> > --
>> > 2.4.10
>> >
>> > _______________________________________________
>> > mesa-dev mailing list
>> > mesa-dev at lists.freedesktop.org
>> > https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
>
>
>> _______________________________________________
>> mesa-dev mailing list
>> mesa-dev at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
More information about the mesa-dev
mailing list