From 9e13a16c974b239eedc121c647f1d54a1fe4d9e4 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Tue, 22 Sep 2020 12:18:30 +0200 Subject: [PATCH] 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: --- src/mesa/main/fbobject.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index 54d2a08184c..ee6f9fa9e4a 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -344,6 +344,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