From 64e7248bfb65cb6c00ffa2a22a354d1755ecd8c2 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Wed, 31 Mar 2021 18:03:01 -0400 Subject: [PATCH] mesa: Ignore the depth buffer when computing framebuffer floatness MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Not that Z32F is especially common, but we shouldn't consider it to imply that the color buffers are also float, which is what floatMode is meant to mean. Reviewed-by: Marek Olšák Part-of: --- src/mesa/main/framebuffer.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mesa/main/framebuffer.c b/src/mesa/main/framebuffer.c index a5460795b88..de79ae0d85a 100644 --- a/src/mesa/main/framebuffer.c +++ b/src/mesa/main/framebuffer.c @@ -447,6 +447,8 @@ _mesa_update_framebuffer_visual(struct gl_context *ctx, fb->Visual.floatMode = GL_FALSE; for (unsigned i = 0; i < BUFFER_COUNT; i++) { + if (i == BUFFER_DEPTH) + continue; if (fb->Attachment[i].Renderbuffer) { const struct gl_renderbuffer *rb = fb->Attachment[i].Renderbuffer; const mesa_format fmt = rb->Format;