Mesa (main): lavapipe: fix stencil clears

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jul 26 00:44:18 UTC 2022


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

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Fri Jul 22 00:34:23 2022 -0400

lavapipe: fix stencil clears

this uses the value from the stencil attachment

Fixes: 8068c68b1ff ("lavapipe: Delete render passes")

Reviewed-by: Dave Airlie <airlied at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17705>

---

 src/gallium/frontends/lavapipe/lvp_execute.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/frontends/lavapipe/lvp_execute.c b/src/gallium/frontends/lavapipe/lvp_execute.c
index dee4752a8af..5de46236e1a 100644
--- a/src/gallium/frontends/lavapipe/lvp_execute.c
+++ b/src/gallium/frontends/lavapipe/lvp_execute.c
@@ -1779,7 +1779,7 @@ static void render_clear(struct rendering_state *state)
    uint32_t sclear_val = 0;
    if (state->stencil_att.load_op == VK_ATTACHMENT_LOAD_OP_CLEAR) {
       ds_clear_flags |= PIPE_CLEAR_STENCIL;
-      sclear_val = state->depth_att.clear_value.depthStencil.stencil;
+      sclear_val = state->stencil_att.clear_value.depthStencil.stencil;
    }
 
    if (ds_clear_flags) {



More information about the mesa-commit mailing list