vkd3d: Call vkCmdBindDescriptorSets() only with valid descriptor set.

If the current pipeline state doesn't need any descriptors it is
perfectly valid to not have a descriptor set.

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:
Józef Kucia 2018-08-15 13:57:55 +02:00 committed by Alexandre Julliard
parent 0488b24c99
commit ef999e1e2b

View File

@ -2188,9 +2188,12 @@ static void d3d12_command_list_update_descriptors(struct d3d12_command_list *lis
}
bindings->descriptor_table_dirty_mask = 0;
bindings->in_use = true;
VK_CALL(vkCmdBindDescriptorSets(list->vk_command_buffer, bind_point,
rs->vk_pipeline_layout, rs->main_set, 1, &bindings->descriptor_set, 0, NULL));
if (bindings->descriptor_set)
{
VK_CALL(vkCmdBindDescriptorSets(list->vk_command_buffer, bind_point,
rs->vk_pipeline_layout, rs->main_set, 1, &bindings->descriptor_set, 0, NULL));
bindings->in_use = true;
}
d3d12_command_list_update_uav_counter_descriptors(list, bind_point);
}