tu/kgsl: Fix memory overwrite with vkFlushMappedMemoryRanges when more than 1 range

Fixes: 5a59410962 ("turnip: add cached and cached-coherent memory types")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23504>
This commit is contained in:
Shan-Min Chao
2023-06-07 09:49:45 -07:00
committed by Marge Bot
parent ae48fae658
commit ece34ec127

View File

@@ -230,7 +230,7 @@ kgsl_sync_cache(VkDevice _device,
struct kgsl_gpuobj_sync_obj *sync_list =
(struct kgsl_gpuobj_sync_obj *) vk_zalloc(
&device->vk.alloc, sizeof(*sync_list), 8,
&device->vk.alloc, sizeof(*sync_list)*count, 8,
VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE);
struct kgsl_gpuobj_sync gpuobj_sync = {