Mesa (master): gallium: handle empty cbuf slots in framebuffer samples helper

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Nov 11 08:35:16 UTC 2020


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

Author: Dave Airlie <airlied at redhat.com>
Date:   Thu Nov  5 05:42:34 2020 +1000

gallium: handle empty cbuf slots in framebuffer samples helper

If we have cbufs but they are all empty, default
to returning the fb->samples.

Fixes:
dEQP-VK.pipeline.multisample.mixed_count.1_4_unused
on lavapipe

v2:
drop unneeded chunk (Roland)

Cc: 20.3 <mesa-stable>
Reviewed-by: Roland Scheidegger <sroland at vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7499>

---

 src/gallium/auxiliary/util/u_framebuffer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/auxiliary/util/u_framebuffer.c b/src/gallium/auxiliary/util/u_framebuffer.c
index f569511393b..36b6c14a4bb 100644
--- a/src/gallium/auxiliary/util/u_framebuffer.c
+++ b/src/gallium/auxiliary/util/u_framebuffer.c
@@ -244,7 +244,7 @@ util_framebuffer_get_num_samples(const struct pipe_framebuffer_state *fb)
                   fb->zsbuf->nr_samples);
    }
 
-   return 1;
+   return MAX2(fb->samples, 1);
 }
 
 



More information about the mesa-commit mailing list