From 3053268fd0624c19a1a45066c006857ef0df3637 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Wed, 21 Feb 2024 16:18:52 +0100 Subject: [PATCH] mesa/main: updates for EXT_texture_format_BGRA8888 The spec is about to change, so let's prepare for the new and brighter future. Reviewed-by: Daniel Stone Part-of: --- src/mesa/main/fbobject.c | 3 ++- src/mesa/main/glformats.c | 16 +--------------- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index da47ac15be1..baf1b5e6791 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -2658,7 +2658,8 @@ _mesa_base_fbo_format(const struct gl_context *ctx, GLenum internalFormat) ? GL_RGB : 0; case GL_BGRA: - /* EXT_texture_format_BGRA8888 only adds this as color-renderable for + case GL_BGRA8_EXT: + /* EXT_texture_format_BGRA8888 only adds these as color-renderable for * GLES 2 and later */ if (_mesa_has_EXT_texture_format_BGRA8888(ctx) && _mesa_is_gles2(ctx)) diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c index 6a6caabeadf..b51f1c9d166 100644 --- a/src/mesa/main/glformats.c +++ b/src/mesa/main/glformats.c @@ -2761,6 +2761,7 @@ _mesa_gles_check_internalformat(struct gl_context *ctx, /* GL_EXT_texture_format_BGRA8888 */ case GL_BGRA: + case GL_BGRA8_EXT: /* GL_OES_required_internalformat */ case GL_RGB565: @@ -2901,21 +2902,6 @@ _mesa_gles_check_internalformat(struct gl_context *ctx, return GL_INVALID_VALUE; return GL_NO_ERROR; - case GL_BGRA8_EXT: { - /* This is technically speaking out-of-spec. But too many - * applications seems to depend on it, so let's allow it - * together with a small complaint */ - static bool warned = false; - if (!warned) { - _mesa_warning(ctx, - "internalformat = GL_BGRA8_EXT invalid by spec, but too many " - "applications depend on it to error. Please fix the software " - "that causes this problem."); - warned = true; - } - return GL_NO_ERROR; - } - default: return GL_INVALID_VALUE; }