Mesa (main): zink: flag the gfx pipeline dirty and unset pipeline shader module on shader change

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Aug 18 21:10:05 UTC 2021


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

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Fri May 14 18:31:50 2021 -0400

zink: flag the gfx pipeline dirty and unset pipeline shader module on shader change

there's no need to leave this until the module updating when the info
is known much earlier

Reviewed-by: Hoe Hao Cheng <haochengho12907 at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12428>

---

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

diff --git a/src/gallium/drivers/zink/zink_program.c b/src/gallium/drivers/zink/zink_program.c
index bb205f729c9..c5163e80c5f 100644
--- a/src/gallium/drivers/zink/zink_program.c
+++ b/src/gallium/drivers/zink/zink_program.c
@@ -881,8 +881,12 @@ bind_stage(struct zink_context *ctx, enum pipe_shader_type stage,
       ctx->compute_stage = shader;
       if (shader)
          zink_select_launch_grid(ctx);
-   } else
+   } else {
       ctx->gfx_stages[stage] = shader;
+      ctx->gfx_pipeline_state.combined_dirty = true;
+      if (!shader)
+         ctx->gfx_pipeline_state.modules[stage] = VK_NULL_HANDLE;
+   }
    ctx->dirty_shader_stages |= 1 << stage;
    if (shader && shader->nir->info.num_inlinable_uniforms)
       ctx->shader_has_inlinable_uniforms_mask |= 1 << stage;



More information about the mesa-commit mailing list