diff --git a/.pick_status.json b/.pick_status.json index ec1b59df217..158ad7e294d 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -4124,7 +4124,7 @@ "description": "zink: stop unsetting zink_gfx_pipeline::modules on shader unbind", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/gallium/drivers/zink/zink_program.c b/src/gallium/drivers/zink/zink_program.c index 7debb335124..9a8e5ac66ab 100644 --- a/src/gallium/drivers/zink/zink_program.c +++ b/src/gallium/drivers/zink/zink_program.c @@ -622,6 +622,8 @@ zink_gfx_program_update(struct zink_context *ctx) for (unsigned i = 0; i < ZINK_GFX_SHADER_COUNT; i++) { if (prog->stages_present & ~ctx->dirty_gfx_stages & BITFIELD_BIT(i)) ctx->gfx_pipeline_state.modules[i] = prog->objs[i].mod; + else + ctx->gfx_pipeline_state.modules[i] = VK_NULL_HANDLE; } /* ensure variants are always updated if keys have changed since last use */ ctx->dirty_gfx_stages |= prog->stages_present; @@ -1818,7 +1820,6 @@ bind_gfx_stage(struct zink_context *ctx, gl_shader_stage stage, struct zink_shad ctx->shader_stages |= BITFIELD_BIT(stage); ctx->gfx_hash ^= ctx->gfx_stages[stage]->hash; } else { - ctx->gfx_pipeline_state.modules[stage] = VK_NULL_HANDLE; if (ctx->curr_program) ctx->gfx_pipeline_state.final_hash ^= ctx->curr_program->last_variant_hash; ctx->curr_program = NULL;