Simplifies the calling of a helper function to create descriptor arrays.
Signed-off-by: Conor McCarthy cmccarthy@codeweavers.com --- libs/vkd3d/state.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/libs/vkd3d/state.c b/libs/vkd3d/state.c index 47b1a797..558a426c 100644 --- a/libs/vkd3d/state.c +++ b/libs/vkd3d/state.c @@ -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; @@ -630,8 +629,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, @@ -663,10 +666,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; }