vkd3d: Temporarily require VK_KHR_push_descriptor.

Allows us to more easily refactor root signature-related code
without having to worry about root descriptors for now.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
This commit is contained in:
Philip Rebohle 2020-03-03 12:49:10 +01:00 committed by Hans-Kristian Arntzen
parent 0d071c9c37
commit 3f125ac919
2 changed files with 3 additions and 22 deletions

View File

@ -4183,16 +4183,7 @@ static void d3d12_command_list_set_root_cbv(struct d3d12_command_list *list,
}
else
{
d3d12_command_list_prepare_descriptors(list, bind_point);
vk_write_descriptor_set_from_root_descriptor(&descriptor_write,
root_parameter, bindings->descriptor_set, NULL, &buffer_info);
VK_CALL(vkUpdateDescriptorSets(list->device->vk_device, 1, &descriptor_write, 0, NULL));
assert(index < ARRAY_SIZE(bindings->push_descriptors));
bindings->push_descriptors[index].u.cbv.vk_buffer = buffer_info.buffer;
bindings->push_descriptors[index].u.cbv.offset = buffer_info.offset;
bindings->push_descriptor_dirty_mask |= 1u << index;
bindings->push_descriptor_active_mask |= 1u << index;
ERR("VK_KHR_push_descriptor not supported.\n");
}
}
@ -4256,15 +4247,7 @@ static void d3d12_command_list_set_root_descriptor(struct d3d12_command_list *li
}
else
{
d3d12_command_list_prepare_descriptors(list, bind_point);
vk_write_descriptor_set_from_root_descriptor(&descriptor_write,
root_parameter, bindings->descriptor_set, &vk_buffer_view, NULL);
VK_CALL(vkUpdateDescriptorSets(list->device->vk_device, 1, &descriptor_write, 0, NULL));
assert(index < ARRAY_SIZE(bindings->push_descriptors));
bindings->push_descriptors[index].u.vk_buffer_view = vk_buffer_view;
bindings->push_descriptor_dirty_mask |= 1u << index;
bindings->push_descriptor_active_mask |= 1u << index;
ERR("VK_KHR_push_descriptor not supported.\n");
}
}

View File

@ -715,7 +715,6 @@ static HRESULT vkd3d_create_pipeline_layout(struct d3d12_device *device,
static HRESULT d3d12_root_signature_init(struct d3d12_root_signature *root_signature,
struct d3d12_device *device, const D3D12_ROOT_SIGNATURE_DESC *desc)
{
const struct vkd3d_vulkan_info *vk_info = &device->vk_info;
struct vkd3d_descriptor_set_context context;
VkDescriptorSetLayoutBinding *binding_desc;
struct d3d12_root_signature_info info;
@ -771,8 +770,7 @@ static HRESULT d3d12_root_signature_init(struct d3d12_root_signature *root_signa
if (FAILED(hr = d3d12_root_signature_init_root_descriptors(root_signature, desc, &context)))
goto fail;
/* We use KHR_push_descriptor for root descriptor parameters. */
if (vk_info->KHR_push_descriptor && context.descriptor_binding)
if (context.descriptor_binding)
{
if (FAILED(hr = vkd3d_create_descriptor_set_layout(device,
VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR,