[Mesa-dev] [RFC PATCH 7/8] mesa/main: Remove now superfluos tests for both EXT_sRGB and EXT_framebuffer_sRGB

Ilia Mirkin imirkin at alum.mit.edu
Tue Nov 13 17:46:49 UTC 2018


Why not order the series such that this commit is not needed?
On Tue, Nov 13, 2018 at 12:28 PM Gert Wollny <gw.fossdev at gmail.com> wrote:
>
> From: Gert Wollny <gert.wollny at collabora.com>
>
> Signed-off-by: Gert Wollny <gert.wollny at collabora.com>
> ---
>  src/mesa/main/fbobject.c | 2 +-
>  src/mesa/main/teximage.c | 3 +--
>  src/mesa/main/version.c  | 5 ++---
>  3 files changed, 4 insertions(+), 6 deletions(-)
>
> diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
> index ca3f3f7f76..7d45ce43f4 100644
> --- a/src/mesa/main/fbobject.c
> +++ b/src/mesa/main/fbobject.c
> @@ -4253,7 +4253,7 @@ get_framebuffer_attachment_parameter(struct gl_context *ctx,
>           }
>        }
>        else {
> -         if (ctx->Extensions.EXT_framebuffer_sRGB || ctx->Extensions.EXT_sRGB) {
> +         if (ctx->Extensions.EXT_sRGB) {
>              *params =
>                 _mesa_get_format_color_encoding(att->Renderbuffer->Format);
>           }
> diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
> index e1d652824e..3c9c8ada99 100644
> --- a/src/mesa/main/teximage.c
> +++ b/src/mesa/main/teximage.c
> @@ -2438,8 +2438,7 @@ copytexture_error_check( struct gl_context *ctx, GLuint dimensions,
>        bool rb_is_srgb = false;
>        bool dst_is_srgb = false;
>
> -      if ((ctx->Extensions.EXT_framebuffer_sRGB ||
> -           ctx->Extensions.EXT_sRGB) &&
> +      if (ctx->Extensions.EXT_sRGB &&
>            _mesa_get_format_color_encoding(rb->Format) == GL_SRGB) {
>           rb_is_srgb = true;
>        }
> diff --git a/src/mesa/main/version.c b/src/mesa/main/version.c
> index 2f7ac75a81..5709d283f3 100644
> --- a/src/mesa/main/version.c
> +++ b/src/mesa/main/version.c
> @@ -512,9 +512,8 @@ compute_version_es2(const struct gl_extensions *extensions,
>                           extensions->ARB_texture_float &&
>                           extensions->ARB_texture_rg &&
>                           extensions->ARB_depth_buffer_float &&
> -                         (extensions->EXT_framebuffer_sRGB ||
> -                          (extensions->ARB_framebuffer_object &&
> -                           extensions->EXT_sRGB)) &&
> +                         extensions->ARB_framebuffer_object &&
> +                         extensions->EXT_sRGB &&
>                           extensions->EXT_packed_float &&
>                           extensions->EXT_texture_array &&
>                           extensions->EXT_texture_shared_exponent &&
> --
> 2.18.1
>


More information about the mesa-dev mailing list