Module: Mesa Branch: main Commit: 0adf2dc875b4bb90d19da5399c61c1cd9435df46 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=0adf2dc875b4bb90d19da5399c61c1cd9435df46
Author: Mike Blumenkrantz <[email protected]> Date: Fri May 20 12:05:29 2022 -0400 zink: flag descriptor sets as changed before updating hashes if the program changes, assume the hashes changed this could probably be improved in the future to check for matching shader interfaces, but that's a problem for later Reviewed-by: Dave Airlie <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16645> --- src/gallium/drivers/zink/zink_descriptors.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/zink/zink_descriptors.c b/src/gallium/drivers/zink/zink_descriptors.c index a60e2dc8ff0..3c647d2ccc4 100644 --- a/src/gallium/drivers/zink/zink_descriptors.c +++ b/src/gallium/drivers/zink/zink_descriptors.c @@ -1400,6 +1400,12 @@ zink_descriptors_update(struct zink_context *ctx, bool is_compute) { struct zink_program *pg = is_compute ? (struct zink_program *)ctx->curr_compute : (struct zink_program *)ctx->curr_program; + if (ctx->dd->pg[is_compute] != pg) { + for (int h = 0; h < ZINK_DESCRIPTOR_TYPES; h++) { + bool has_usage = !!pg->dsl[h + 1]; + ctx->dd->changed[is_compute][h] |= has_usage; + } + } zink_context_update_descriptor_states(ctx, pg); bool cache_hit; VkDescriptorSet desc_set = VK_NULL_HANDLE; @@ -1440,7 +1446,6 @@ zink_descriptors_update(struct zink_context *ctx, bool is_compute) { for (int h = 0; h < ZINK_DESCRIPTOR_TYPES; h++) { if (pdd_cached(pg)->cache_misses[h] < MAX_CACHE_MISSES) { - ctx->dd->changed[is_compute][h] |= ctx->dd->pg[is_compute] != pg; if (pg->dsl[h + 1]) { /* null set has null pool */ if (pdd_cached(pg)->pool[h]) {
