vkd3d: Ensure shader interface is set up per vkd3d_create_shader_stage.

Prepares for a situation where we can move this code into
vkd3d_create_shader_stage itself.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
This commit is contained in:
Hans-Kristian Arntzen 2022-03-18 16:33:20 +01:00
parent 54a6605edf
commit f78b635d54
1 changed files with 3 additions and 6 deletions

View File

@ -2976,7 +2976,6 @@ static HRESULT d3d12_pipeline_state_init_graphics(struct d3d12_pipeline_state *s
uint32_t instance_divisors[D3D12_VS_INPUT_REGISTER_COUNT];
uint32_t aligned_offsets[D3D12_VS_INPUT_REGISTER_COUNT];
struct vkd3d_shader_transform_feedback_info xfb_info;
struct vkd3d_shader_interface_info shader_interface;
struct vkd3d_shader_signature output_signature;
struct vkd3d_shader_signature input_signature;
VkShaderStageFlagBits xfb_stage = 0;
@ -3217,9 +3216,6 @@ static HRESULT d3d12_pipeline_state_init_graphics(struct d3d12_pipeline_state *s
xfb_stage = VK_SHADER_STAGE_VERTEX_BIT;
}
/* Stage / XFB info are overridden later. */
d3d12_pipeline_state_init_shader_interface(state, device, VK_SHADER_STAGE_ALL, &shader_interface);
graphics->patch_vertex_count = 0;
for (i = 0; i < ARRAY_SIZE(shader_stages); ++i)
@ -3306,14 +3302,15 @@ static HRESULT d3d12_pipeline_state_init_graphics(struct d3d12_pipeline_state *s
for (i = 0; i < ARRAY_SIZE(shader_stages); i++)
{
const D3D12_SHADER_BYTECODE *b = (const void *)((uintptr_t)desc + shader_stages[i].offset);
struct vkd3d_shader_interface_info shader_interface;
struct vkd3d_shader_compile_arguments compile_args;
if (!b->pShaderBytecode)
continue;
/* TODO: Move this to vkd3d_create_shader_stage itself. */
d3d12_pipeline_state_init_shader_interface(state, device, shader_stages[i].stage, &shader_interface);
shader_interface.xfb_info = shader_stages[i].stage == xfb_stage ? &xfb_info : NULL;
shader_interface.stage = shader_stages[i].stage;
d3d12_pipeline_state_init_compile_arguments(state, device, shader_interface.stage, &compile_args);
if (FAILED(hr = vkd3d_create_shader_stage(device,