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 <post@arntzen-software.no>
This commit is contained in:
Hans-Kristian Arntzen 2020-12-05 14:52:01 +01:00 committed by Philip Rebohle
parent 6b363e53d2
commit 8fb88855e5
1 changed files with 2 additions and 2 deletions

View File

@ -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);