From 718e9dd1332feafab3036519afee96f7816e6591 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Wed, 8 Sep 2021 15:19:56 -0400 Subject: [PATCH] zink: use descriptor info for ubo hashing Reviewed-by: Dave Airlie Part-of: --- src/gallium/drivers/zink/zink_descriptors.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/zink/zink_descriptors.c b/src/gallium/drivers/zink/zink_descriptors.c index 46e1ab63544..b7241d0c2c1 100644 --- a/src/gallium/drivers/zink/zink_descriptors.c +++ b/src/gallium/drivers/zink/zink_descriptors.c @@ -1504,11 +1504,11 @@ calc_descriptor_state_hash_ubo(struct zink_context *ctx, enum pipe_shader_type s struct zink_resource *res = ctx->di.descriptor_res[ZINK_DESCRIPTOR_TYPE_UBO][shader][idx]; struct zink_resource_object *obj = res ? res->obj : NULL; hash = XXH32(&obj, sizeof(void*), hash); - void *hash_data = &ctx->ubos[shader][idx].buffer_size; + void *hash_data = &ctx->di.ubos[shader][idx].range; size_t data_size = sizeof(unsigned); hash = XXH32(hash_data, data_size, hash); if (need_offset) - hash = XXH32(&ctx->ubos[shader][idx].buffer_offset, sizeof(unsigned), hash); + hash = XXH32(&ctx->di.ubos[shader][idx].offset, sizeof(unsigned), hash); return hash; }