Skip to content
Snippets Groups Projects
Commit 341f9745 authored by Conor McCarthy's avatar Conor McCarthy Committed by Alexandre Julliard
Browse files

vkd3d: Narrow the scope of cur_binding in d3d12_root_signature_init_root_descriptor_tables().


Simplifies the calling of a helper function to create descriptor arrays.

Signed-off-by: default avatarConor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: default avatarHenri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard's avatarAlexandre Julliard <julliard@winehq.org>
parent 112ed83d
No related branches found
No related tags found
No related merge requests found
......@@ -580,7 +580,6 @@ static uint32_t vkd3d_descriptor_magic_from_d3d12(D3D12_DESCRIPTOR_RANGE_TYPE ty
static HRESULT d3d12_root_signature_init_root_descriptor_tables(struct d3d12_root_signature *root_signature,
const D3D12_ROOT_SIGNATURE_DESC *desc, struct vkd3d_descriptor_set_context *context)
{
VkDescriptorSetLayoutBinding *cur_binding = context->current_binding;
struct d3d12_root_descriptor_table *table;
const D3D12_DESCRIPTOR_RANGE *range;
unsigned int i, j, k, range_count;
......@@ -627,8 +626,12 @@ static HRESULT d3d12_root_signature_init_root_descriptor_tables(struct d3d12_roo
for (j = 0; j < range_count; ++j)
{
VkDescriptorSetLayoutBinding *cur_binding;
range = &p->u.DescriptorTable.pDescriptorRanges[j];
cur_binding = context->current_binding;
vk_binding = d3d12_root_signature_assign_vk_bindings(root_signature,
vkd3d_descriptor_type_from_d3d12_range_type(range->RangeType),
range->RegisterSpace, range->BaseShaderRegister, range->NumDescriptors, false, true,
......@@ -660,10 +663,11 @@ static HRESULT d3d12_root_signature_init_root_descriptor_tables(struct d3d12_roo
}
table->ranges[j].binding = vk_binding;
context->current_binding = cur_binding;
}
}
context->current_binding = cur_binding;
return S_OK;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment