Module: vkd3d Branch: master Commit: 04a08088ec54317dd0ccf13e7a39fdb9349fb31a URL: https://source.winehq.org/git/vkd3d.git/?a=commit;h=04a08088ec54317dd0ccf13e...
Author: Conor McCarthy cmccarthy@codeweavers.com Date: Sat Aug 14 00:55:40 2021 +1000
vkd3d: Calculate shader visibility once per root signature table.
Signed-off-by: Conor McCarthy cmccarthy@codeweavers.com Signed-off-by: Henri Verbeet hverbeet@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
libs/vkd3d/state.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libs/vkd3d/state.c b/libs/vkd3d/state.c index f9efeee..58463e5 100644 --- a/libs/vkd3d/state.c +++ b/libs/vkd3d/state.c @@ -664,6 +664,7 @@ static HRESULT d3d12_root_signature_init_root_descriptor_tables(struct d3d12_roo for (i = 0; i < desc->NumParameters; ++i) { const D3D12_ROOT_PARAMETER *p = &desc->pParameters[i]; + enum vkd3d_shader_visibility shader_visibility; unsigned int offset = 0;
if (p->ParameterType != D3D12_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE) @@ -673,6 +674,7 @@ static HRESULT d3d12_root_signature_init_root_descriptor_tables(struct d3d12_roo
table = &root_signature->parameters[i].u.descriptor_table; range_count = p->u.DescriptorTable.NumDescriptorRanges; + shader_visibility = vkd3d_shader_visibility_from_d3d12(p->ShaderVisibility);
root_signature->parameters[i].parameter_type = p->ParameterType; table->range_count = range_count; @@ -723,7 +725,7 @@ static HRESULT d3d12_root_signature_init_root_descriptor_tables(struct d3d12_roo
vk_binding = d3d12_root_signature_assign_vk_bindings(root_signature, range->type, range->register_space, range->base_register_idx, range->descriptor_count, false, true, - vkd3d_shader_visibility_from_d3d12(p->ShaderVisibility), context); + shader_visibility, context);
/* Unroll descriptor range. */ for (k = 0; k < range->descriptor_count; ++k)