diff options
authorErik Faye-Lund <>2020-09-22 12:18:30 +0200
committerEric Engestrom <>2020-09-27 11:09:59 +0200
commit53356f8972924ad93383aba87f3ae95d0ec13b2b (patch)
parent7590165899e2bee2c8131618841f42a5caa52b49 (diff)
mesa: handle GL_FRONT after translating to it
Without this, we end up throwing errors on code along these lines when rendering using single-buffering: GLint att; glGetIntegerv(GL_READ_BUFFER, &att); glGetFramebufferAttachmentParameteriv(GL_READ_FRAMEBUFFER, att, ...); This is because we internally translate GL_BACK (which is what glGetIntegerv returned) to GL_FRONT, which we don't handle in the Desktop GL case. So let's start handling it. This fixes the GLTF-GL33.gtf21.GL2FixedTests.buffer_color.blend_color test for me. Fixes: e6ca6e587e7 ("mesa: Handle pbuffers in desktop GL framebuffer attachment queries") Reviewed-by: Marek Olšák <> Part-of: <> (cherry picked from commit 9e13a16c974b239eedc121c647f1d54a1fe4d9e4)
2 files changed, 2 insertions, 1 deletions
diff --git a/.pick_status.json b/.pick_status.json
index b865ecce223..f312e492bbf 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -940,7 +940,7 @@
"description": "mesa: handle GL_FRONT after translating to it",
"nominated": true,
"nomination_type": 1,
- "resolution": 0,
+ "resolution": 1,
"master_sha": null,
"because_sha": "e6ca6e587e7f88d6b06c0a5c966438beac6cb18e"
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index e43d07b2b8c..85b849a620e 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -343,6 +343,7 @@ get_fb0_attachment(struct gl_context *ctx, struct gl_framebuffer *fb,
switch (attachment) {
+ case GL_FRONT:
/* Front buffers can be allocated on the first use, but
* glGetFramebufferAttachmentParameteriv must work even if that