diff --git a/src/mesa/main/genmipmap.c b/src/mesa/main/genmipmap.c index 519be2578c7..3d3b896a16c 100644 --- a/src/mesa/main/genmipmap.c +++ b/src/mesa/main/genmipmap.c @@ -87,15 +87,10 @@ _mesa_is_valid_generate_texture_mipmap_internalformat(struct gl_context *ctx, * not specified with an unsized internal format from table 8.3 or a * sized internal format that is both color-renderable and * texture-filterable according to table 8.10." - * - * GL_EXT_texture_format_BGRA8888 adds a GL_BGRA_EXT unsized internal - * format, and includes it in a very similar looking table. So we - * include it here as well. */ return internalformat == GL_RGBA || internalformat == GL_RGB || internalformat == GL_LUMINANCE_ALPHA || internalformat == GL_LUMINANCE || internalformat == GL_ALPHA || - internalformat == GL_BGRA_EXT || (_mesa_is_es3_color_renderable(ctx, internalformat) && _mesa_is_es3_texture_filterable(ctx, internalformat)); } diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c index 116d12e48d8..5fbcb0f3afd 100644 --- a/src/mesa/main/glformats.c +++ b/src/mesa/main/glformats.c @@ -4027,6 +4027,9 @@ _mesa_is_es3_color_renderable(const struct gl_context *ctx, case GL_RGBA16_SNORM: return _mesa_has_EXT_texture_norm16(ctx) && _mesa_has_EXT_render_snorm(ctx); + case GL_BGRA: + assert(_mesa_has_EXT_texture_format_BGRA8888(ctx)); + return true; default: return false; } @@ -4085,6 +4088,9 @@ _mesa_is_es3_texture_filterable(const struct gl_context *ctx, * for the R32F, RG32F, RGB32F, and RGBA32F formats." */ return _mesa_has_OES_texture_float_linear(ctx); + case GL_BGRA: + assert(_mesa_has_EXT_texture_format_BGRA8888(ctx)); + return true; default: return false; }