summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Faye-Lund <erik.faye-lund@collabora.com>2020-09-22 12:18:30 +0200
committerEric Engestrom <eric@engestrom.ch>2020-09-27 11:09:59 +0200
commit53356f8972924ad93383aba87f3ae95d0ec13b2b (patch)
tree9df9310dfef39594492ce5488692e01273322b26
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 <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6815> (cherry picked from commit 9e13a16c974b239eedc121c647f1d54a1fe4d9e4)
-rw-r--r--.pick_status.json2
-rw-r--r--src/mesa/main/fbobject.c1
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:
case GL_FRONT_LEFT:
/* Front buffers can be allocated on the first use, but
* glGetFramebufferAttachmentParameteriv must work even if that