zink: add layout to sampler descriptor hash
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Tue, 15 Feb 2022 14:15:22 +0000 (09:15 -0500)
committerMarge Bot <emma+marge@anholt.net>
Sat, 26 Feb 2022 15:26:08 +0000 (15:26 +0000)
this can have more than one value, so avoid stale cache entries

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15173>

src/gallium/drivers/zink/zink_descriptors.c

index 0440374..770edda 100644 (file)
@@ -1539,6 +1539,8 @@ calc_descriptor_state_hash_sampler(struct zink_context *ctx, struct zink_shader
       if (is_buffer)
          continue;
 
+      hash = XXH32(&ctx->di.textures[shader][idx + k].imageLayout, sizeof(VkImageLayout), hash);
+
       struct zink_sampler_state *sampler_state = ctx->sampler_states[shader][idx + k];
 
       if (sampler_state)