mesa: Ignore the depth buffer when computing framebuffer floatness

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 <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10491>
This commit is contained in:
Adam Jackson 2021-03-31 18:03:01 -04:00 committed by Marge Bot
parent d7888294ac
commit 64e7248bfb
1 changed files with 2 additions and 0 deletions

View File

@ -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;