diff --git a/.pick_status.json b/.pick_status.json index 6cc8e1ba61f..74ad374d64a 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1504,7 +1504,7 @@ "description": "mesa/main: allow GL_BGRA for FBOs", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "1d595c7cd4aefc7baf1942626f53bec8f6699f7f", "notes": null diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index 9f409ac2029..47e7f5f4ebd 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -2659,6 +2659,16 @@ _mesa_base_fbo_format(const struct gl_context *ctx, GLenum internalFormat) case GL_RGB565: return _mesa_is_gles(ctx) || ctx->Extensions.ARB_ES2_compatibility ? GL_RGB : 0; + + case GL_BGRA: + /* EXT_texture_format_BGRA8888 only adds this as color-renderable for + * GLES 2 and later + */ + if (_mesa_has_EXT_texture_format_BGRA8888(ctx) && _mesa_is_gles2(ctx)) + return GL_RGBA; + else + return 0; + default: return 0; }