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

Author: antonino <[email protected]>
Date:   Thu Apr 27 15:55:39 2023 +0200

zink: set when pipeline dirty flag when multisample changes

Sets `gfx_pipeline_state.dirty` appropriately when
`gfx_pipeline_state.multisample` changes

Fixes: 14d58926099 ("zink: add to multisample field to 
`zink_gfx_pipeline_state`")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22736>

---

 src/gallium/drivers/zink/zink_state.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/zink/zink_state.c 
b/src/gallium/drivers/zink/zink_state.c
index bebdd22ab27..185300546e1 100644
--- a/src/gallium/drivers/zink/zink_state.c
+++ b/src/gallium/drivers/zink/zink_state.c
@@ -659,7 +659,7 @@ zink_bind_rasterizer_state(struct pipe_context *pctx, void 
*cso)
    bool half_pixel_center = ctx->rast_state ? 
ctx->rast_state->base.half_pixel_center : true;
    float line_width = ctx->rast_state ? ctx->rast_state->base.line_width : 1.0;
    ctx->rast_state = cso;
-   ctx->gfx_pipeline_state.multisample = !ctx->rast_state || 
ctx->rast_state->base.multisample;
+   bool multisample = !ctx->rast_state || ctx->rast_state->base.multisample;
 
    if (ctx->rast_state) {
       if (screen->info.have_EXT_provoking_vertex &&
@@ -711,6 +711,10 @@ zink_bind_rasterizer_state(struct pipe_context *pctx, void 
*cso)
          zink_set_fs_base_key(ctx)->force_persample_interp = 
ctx->rast_state->base.force_persample_interp;
          ctx->gfx_pipeline_state.dirty = true;
       }
+      if (ctx->gfx_pipeline_state.multisample != multisample) {
+         ctx->gfx_pipeline_state.multisample = multisample;
+         ctx->gfx_pipeline_state.dirty |= !screen->have_full_ds3;
+      }
       ctx->gfx_pipeline_state.force_persample_interp = 
ctx->rast_state->base.force_persample_interp;
 
       if (ctx->rast_state->base.half_pixel_center != half_pixel_center)

Reply via email to