vkd3d-shader/ir: Pass a local copy of location to control_point_normaliser_emit_hs_input().

This commit is contained in:
Conor McCarthy 2023-12-08 00:34:10 +10:00 committed by Alexandre Julliard
parent b0d1fb0bd7
commit 45679a966c
Notes: Alexandre Julliard 2023-12-07 22:48:39 +01:00
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/515

View File

@ -463,6 +463,7 @@ static enum vkd3d_result instruction_array_normalise_hull_shader_control_point_i
struct vkd3d_shader_instruction_array *instructions;
struct control_point_normaliser normaliser;
unsigned int input_control_point_count;
struct vkd3d_shader_location location;
struct vkd3d_shader_instruction *ins;
enum vkd3d_result ret;
unsigned int i, j;
@ -513,8 +514,10 @@ static enum vkd3d_result instruction_array_normalise_hull_shader_control_point_i
return VKD3D_OK;
case VKD3DSIH_HS_FORK_PHASE:
case VKD3DSIH_HS_JOIN_PHASE:
/* ins may be relocated if the instruction array expands. */
location = ins->location;
ret = control_point_normaliser_emit_hs_input(&normaliser, input_signature,
input_control_point_count, i, &ins->location);
input_control_point_count, i, &location);
*src_instructions = normaliser.instructions;
return ret;
default: