Francisco Casas (@fcasas) commented about libs/vkd3d-shader/ir.c:
if (ins->handler_idx == VKD3DSIH_RET) { + normaliser->last_ret_location = ins->location;
I don't understand ir.c very well yet. That said, I am not sure if flattener_eliminate_phase_related_dcls() is the right place to initialize `normaliser.last_ret_location`. Maybe initializing this value deserves a separated function, lest we forget that we are charging flattener_eliminate_phase_related_dcls() with this additional responsibility. Also, it seems to me that it could be a local variable in instruction_array_flatten_hull_shader_phases() instead of a member of the normalizer, unless there is another place where it could be used later. -- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/317#note_44842