vkd3d: Simplify d3d12_command_list_set_root_descriptor().

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-10-11 15:33:29 +02:00 committed by Alexandre Julliard
parent 7652a6e62c
commit 3b0d20c474

View File

@ -3465,12 +3465,8 @@ static void d3d12_command_list_set_root_descriptor(struct d3d12_command_list *li
return;
}
if (!vk_info->KHR_push_descriptor)
d3d12_command_list_prepare_descriptors(list, bind_point);
descriptor_write.sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET;
descriptor_write.pNext = NULL;
descriptor_write.dstSet = bindings->descriptor_set;
descriptor_write.dstBinding = root_descriptor->binding;
descriptor_write.dstArrayElement = 0;
descriptor_write.descriptorCount = 1;
@ -3481,11 +3477,14 @@ static void d3d12_command_list_set_root_descriptor(struct d3d12_command_list *li
if (vk_info->KHR_push_descriptor)
{
descriptor_write.dstSet = VK_NULL_HANDLE;
VK_CALL(vkCmdPushDescriptorSetKHR(list->vk_command_buffer, bind_point,
root_signature->vk_pipeline_layout, 0, 1, &descriptor_write));
}
else
{
d3d12_command_list_prepare_descriptors(list, bind_point);
descriptor_write.dstSet = bindings->descriptor_set;
VK_CALL(vkUpdateDescriptorSets(list->device->vk_device, 1, &descriptor_write, 0, NULL));
}
}