Józef Kucia : vkd3d: Require D3D12_ROOT_SIGNATURE_FLAG_ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT for input layout.
Module: vkd3d Branch: master Commit: 1a05563fc7827c1e682a8fb67fa5b5695b736658 URL: https://source.winehq.org/git/vkd3d.git/?a=commit;h=1a05563fc7827c1e682a8fb6... Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Wed Jan 16 12:44:58 2019 +0100 vkd3d: Require D3D12_ROOT_SIGNATURE_FLAG_ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT for input layout. Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- libs/vkd3d/state.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/libs/vkd3d/state.c b/libs/vkd3d/state.c index e9f73e8..18addf3 100644 --- a/libs/vkd3d/state.c +++ b/libs/vkd3d/state.c @@ -904,7 +904,8 @@ static HRESULT d3d12_root_signature_init(struct d3d12_root_signature *root_signa root_signature->static_sampler_count = 0; root_signature->static_samplers = NULL; - if (desc->Flags & ~D3D12_ROOT_SIGNATURE_FLAG_ALLOW_STREAM_OUTPUT) + if (desc->Flags & ~(D3D12_ROOT_SIGNATURE_FLAG_ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT + | D3D12_ROOT_SIGNATURE_FLAG_ALLOW_STREAM_OUTPUT)) FIXME("Ignoring root signature flags %#x.\n", desc->Flags); if (FAILED(hr = d3d12_root_signature_info_from_desc(&info, desc))) @@ -2282,6 +2283,14 @@ static HRESULT d3d12_pipeline_state_init_graphics(struct d3d12_pipeline_state *s graphics->attribute_count = ARRAY_SIZE(graphics->attributes); } + if (graphics->attribute_count + && !(root_signature->flags & D3D12_ROOT_SIGNATURE_FLAG_ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT)) + { + WARN("Input layout is used without D3D12_ROOT_SIGNATURE_FLAG_ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT.\n"); + hr = E_INVALIDARG; + goto fail; + } + if (FAILED(hr = compute_input_layout_offsets(&desc->InputLayout, aligned_offsets))) goto fail;
participants (1)
-
Alexandre Julliard