mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
libs/vkd3d: Return early if there are no descriptors to update.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
8b8128b055
commit
2a430ae991
@ -2048,6 +2048,10 @@ static void d3d12_command_list_update_descriptor_table(struct d3d12_command_list
|
|||||||
descriptor_count = 0;
|
descriptor_count = 0;
|
||||||
for (i = 0; i < descriptor_table->range_count; ++i)
|
for (i = 0; i < descriptor_table->range_count; ++i)
|
||||||
descriptor_count += descriptor_table->ranges[i].descriptor_count;
|
descriptor_count += descriptor_table->ranges[i].descriptor_count;
|
||||||
|
|
||||||
|
if (!descriptor_count)
|
||||||
|
return;
|
||||||
|
|
||||||
if (!(descriptor_writes = vkd3d_calloc(descriptor_count, sizeof(*descriptor_writes))))
|
if (!(descriptor_writes = vkd3d_calloc(descriptor_count, sizeof(*descriptor_writes))))
|
||||||
return;
|
return;
|
||||||
if (!(image_infos = vkd3d_calloc(descriptor_count, sizeof(*image_infos))))
|
if (!(image_infos = vkd3d_calloc(descriptor_count, sizeof(*image_infos))))
|
||||||
|
Loading…
Reference in New Issue
Block a user