From 53356f8972924ad93383aba87f3ae95d0ec13b2b Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Tue, 22 Sep 2020 12:18:30 +0200 Subject: mesa: handle GL_FRONT after translating to it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- .pick_status.json | 2 +- src/mesa/main/fbobject.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3