vkd3d: Do not keep track of descriptor heaps when using virtual heaps.

Descriptors only need flushing when using Vulkan heaps, so let's avoid
uselessly scanning an array and taking and releasing a mutex if we're not.
This commit is contained in:
Giovanni Mascellani 2024-09-06 12:23:14 +02:00 committed by Henri Verbeet
parent 05a5bd620d
commit d71966c77e
Notes: Henri Verbeet 2024-09-10 21:58:29 +02:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Conor McCarthy (@cmccarthy)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1052

View File

@ -3210,6 +3210,9 @@ static void command_list_flush_vk_heap_updates(struct d3d12_command_list *list)
static void command_list_add_descriptor_heap(struct d3d12_command_list *list, struct d3d12_descriptor_heap *heap) static void command_list_add_descriptor_heap(struct d3d12_command_list *list, struct d3d12_descriptor_heap *heap)
{ {
if (!list->device->use_vk_heaps)
return;
if (!contains_heap(list->descriptor_heaps, list->descriptor_heap_count, heap)) if (!contains_heap(list->descriptor_heaps, list->descriptor_heap_count, heap))
{ {
if (list->descriptor_heap_count == ARRAY_SIZE(list->descriptor_heaps)) if (list->descriptor_heap_count == ARRAY_SIZE(list->descriptor_heaps))