From 1928268fb35ebe64b8a636bb3b003b3eba82439e Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Fri, 25 Mar 2022 18:11:54 -0400 Subject: [PATCH] zink: force push descriptors cache update if hashing detects changes this was previously only forced if the program pointer changed, but programs can be freed and reused, and these are definite cases where the last set cannot be reused, so jam it in cc: mesa-stable Reviewed-by: Dave Airlie Part-of: (cherry picked from commit d415c28e64dd5f281067130b39e5e6b22bc2e963) --- .pick_status.json | 2 +- src/gallium/drivers/zink/zink_descriptors.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index 6d57c1edfc9..e1388b1c2d8 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1692,7 +1692,7 @@ "description": "zink: force push descriptors cache update if hashing detects changes", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "because_sha": null }, { diff --git a/src/gallium/drivers/zink/zink_descriptors.c b/src/gallium/drivers/zink/zink_descriptors.c index f60e0913f57..fcb986049fd 100644 --- a/src/gallium/drivers/zink/zink_descriptors.c +++ b/src/gallium/drivers/zink/zink_descriptors.c @@ -1710,6 +1710,8 @@ zink_context_update_descriptor_states(struct zink_context *ctx, struct zink_prog first = false; } } + ctx->dd->changed[pg->is_compute][ZINK_DESCRIPTOR_TYPES] |= ctx->dd->push_state[pg->is_compute] != hash; + ctx->dd->changed[pg->is_compute][ZINK_DESCRIPTOR_TYPES] |= pg->dd->push_usage != ctx->dd->last_push_usage[pg->is_compute]; ctx->dd->push_state[pg->is_compute] = hash; ctx->dd->push_valid[pg->is_compute] = true; ctx->dd->last_push_usage[pg->is_compute] = pg->dd->push_usage;