mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
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:
parent
68a4b89d61
commit
f0530d92b8
@ -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_return(&compiler->spirv_builder);
|
||||||
vkd3d_spirv_build_op_function_end(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, 0, sizeof(compiler->private_output_variable));
|
||||||
memset(compiler->private_output_variable_write_mask, 0, sizeof(compiler->private_output_variable_write_mask));
|
memset(compiler->private_output_variable_write_mask, 0, sizeof(compiler->private_output_variable_write_mask));
|
||||||
compiler->epilogue_function_id = 0;
|
compiler->epilogue_function_id = 0;
|
||||||
@ -5443,6 +5439,12 @@ static void vkd3d_dxbc_compiler_leave_shader_phase(struct vkd3d_dxbc_compiler *c
|
|||||||
memset(®, 0, sizeof(reg));
|
memset(®, 0, sizeof(reg));
|
||||||
reg.idx[1].offset = ~0u;
|
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)
|
for (i = 0; i < signature->element_count; ++i)
|
||||||
{
|
{
|
||||||
const struct vkd3d_shader_signature_element *e = &signature->elements[i];
|
const struct vkd3d_shader_signature_element *e = &signature->elements[i];
|
||||||
|
Loading…
Reference in New Issue
Block a user