Mesa (master): mesa: Ignore the depth buffer when computing framebuffer floatness

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed May 5 03:51:12 UTC 2021


Module: Mesa
Branch: master
Commit: 64e7248bfb65cb6c00ffa2a22a354d1755ecd8c2
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=64e7248bfb65cb6c00ffa2a22a354d1755ecd8c2

Author: Adam Jackson <ajax at redhat.com>
Date:   Wed Mar 31 18:03:01 2021 -0400

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 at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10491>

---

 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;



More information about the mesa-commit mailing list