Mesa (main): llvmpipe: fix linear rast samples check.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Feb 16 21:08:02 UTC 2022


Module: Mesa
Branch: main
Commit: eebe298a8786b1f480e90e6d13493c6962189b9d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=eebe298a8786b1f480e90e6d13493c6962189b9d

Author: Dave Airlie <airlied at redhat.com>
Date:   Wed Feb 16 16:00:00 2022 +1000

llvmpipe: fix linear rast samples check.

The checks didn't work for the samples == 0 case, just fix it
to use the helper.

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

---

 src/gallium/drivers/llvmpipe/lp_state_derived.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/llvmpipe/lp_state_derived.c b/src/gallium/drivers/llvmpipe/lp_state_derived.c
index d30d619d874..3d60e18de74 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_derived.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_derived.c
@@ -182,7 +182,7 @@ check_linear_rasterizer( struct llvmpipe_context *lp )
    boolean clipping_changed = FALSE;
 
    bgr8 = (lp->framebuffer.nr_cbufs == 1 && lp->framebuffer.cbufs[0] &&
-           lp->framebuffer.cbufs[0]->texture->nr_samples == 1 &&
+           util_res_sample_count(lp->framebuffer.cbufs[0]->texture) == 1 &&
            lp->framebuffer.cbufs[0]->texture->target == PIPE_TEXTURE_2D &&
            (lp->framebuffer.cbufs[0]->format == PIPE_FORMAT_B8G8R8A8_UNORM ||
             lp->framebuffer.cbufs[0]->format == PIPE_FORMAT_B8G8R8X8_UNORM));



More information about the mesa-commit mailing list