From 8fb88855e5fddd1d3353a7d786d6bccb585402f5 Mon Sep 17 00:00:00 2001 From: Hans-Kristian Arntzen Date: Sat, 5 Dec 2020 14:52:01 +0100 Subject: [PATCH] vkd3d: Hash buffers and views based on format, not vk_format. The creation infos use the format, which potentially contains other information as well. Signed-off-by: Hans-Kristian Arntzen --- libs/vkd3d/resource.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/vkd3d/resource.c b/libs/vkd3d/resource.c index 7ffa21f2..379d4e26 100644 --- a/libs/vkd3d/resource.c +++ b/libs/vkd3d/resource.c @@ -1419,14 +1419,14 @@ static uint32_t vkd3d_view_entry_hash(const void *key) hash = hash_uint64((uint64_t)k->u.buffer.buffer); hash = hash_combine(hash, hash_uint64(k->u.buffer.offset)); hash = hash_combine(hash, hash_uint64(k->u.buffer.size)); - hash = hash_combine(hash, k->u.buffer.format->vk_format); + hash = hash_combine(hash, (uintptr_t)k->u.buffer.format); break; case VKD3D_VIEW_TYPE_IMAGE: hash = hash_uint64((uint64_t)k->u.texture.image); hash = hash_combine(hash, k->u.texture.view_type); hash = hash_combine(hash, k->u.texture.layout); - hash = hash_combine(hash, k->u.texture.format->vk_format); + hash = hash_combine(hash, (uintptr_t)k->u.texture.format); hash = hash_combine(hash, k->u.texture.miplevel_idx); hash = hash_combine(hash, k->u.texture.miplevel_count); hash = hash_combine(hash, k->u.texture.layer_idx);