mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
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:
parent
7652a6e62c
commit
3b0d20c474
@ -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));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user