vkd3d-shader: Clear output register status while leaving control point phase.

We need to clear output register status when epilogue function isn't
used.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Józef Kucia 2019-05-14 13:27:40 +02:00 committed by Alexandre Julliard
parent 68a4b89d61
commit f0530d92b8

View File

@ -4474,10 +4474,6 @@ static void vkd3d_dxbc_compiler_emit_shader_epilogue_function(struct vkd3d_dxbc_
vkd3d_spirv_build_op_return(&compiler->spirv_builder);
vkd3d_spirv_build_op_function_end(builder);
/* Fork and join phases share output registers (patch constants). */
if (!phase || is_control_point_phase(phase))
memset(compiler->output_info, 0, signature->element_count * sizeof(*compiler->output_info));
memset(compiler->private_output_variable, 0, sizeof(compiler->private_output_variable));
memset(compiler->private_output_variable_write_mask, 0, sizeof(compiler->private_output_variable_write_mask));
compiler->epilogue_function_id = 0;
@ -5443,6 +5439,12 @@ static void vkd3d_dxbc_compiler_leave_shader_phase(struct vkd3d_dxbc_compiler *c
memset(&reg, 0, sizeof(reg));
reg.idx[1].offset = ~0u;
/* Fork and join phases share output registers (patch constants).
* Control point phase has separate output registers. */
memset(compiler->output_info, 0, signature->element_count * sizeof(*compiler->output_info));
memset(compiler->private_output_variable, 0, sizeof(compiler->private_output_variable));
memset(compiler->private_output_variable_write_mask, 0, sizeof(compiler->private_output_variable_write_mask));
for (i = 0; i < signature->element_count; ++i)
{
const struct vkd3d_shader_signature_element *e = &signature->elements[i];