From 76c3f6fb3ff21e9cbe40345b6215ead1771b449b Mon Sep 17 00:00:00 2001 From: Gert Wollny Date: Wed, 14 Nov 2018 10:58:40 +0100 Subject: mesa/main: Use flag for EXT_sRGB instead of EXT_framebuffer_sRGB where possible MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit All drivers that support EXT_framebuffer_sRGB also support EXT_sRGB, but in order to keep this commit minial, and not to break any drivers both flags are checked. v2: - Use only EXT_sRGB (Ilia Mirkin) - Move adding the flag EXT_sRGB to gl_extensions to a separate patch v3: use _mesa_has_EXT_framebuffer_sRGB instead of extension flag The _mesa_has function also checks for the correct versions and should be preferred over using the flags directly (Erik) Signed-off-by: Gert Wollny Reviewed-by: Marek Olšák --- src/mesa/main/formatquery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa/main/formatquery.c') diff --git a/src/mesa/main/formatquery.c b/src/mesa/main/formatquery.c index 84b5f512ba5..3b0f6dafad7 100644 --- a/src/mesa/main/formatquery.c +++ b/src/mesa/main/formatquery.c @@ -1241,7 +1241,7 @@ _mesa_GetInternalformativ(GLenum target, GLenum internalformat, GLenum pname, break; case GL_SRGB_WRITE: - if (!_mesa_has_EXT_framebuffer_sRGB(ctx) || + if (!ctx->Extensions.EXT_sRGB || !_mesa_is_color_format(internalformat)) { goto end; } -- cgit v1.2.3