[PATCH 0/1] MR446: vkd3d-shader/ir: Synthesize HS inputs with the register index and write mask of the signature element.
From: Zebediah Figura <zfigura(a)codeweavers.com> This pass was written as if to output normalized I/O, but it runs before the I/O normalization pass. Fixes: 98b5e2c6e01199d714d18fccfe54826a680aecbf --- libs/vkd3d-shader/ir.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/vkd3d-shader/ir.c b/libs/vkd3d-shader/ir.c index 8cf92656..b34ec0c7 100644 --- a/libs/vkd3d-shader/ir.c +++ b/libs/vkd3d-shader/ir.c @@ -449,7 +449,8 @@ static enum vkd3d_result control_point_normaliser_emit_hs_input(struct control_p shader_dst_param_io_init(param, e, VKD3DSPR_INPUT, 2); param->reg.idx[0].offset = input_control_point_count; - param->reg.idx[1].offset = i; + param->reg.idx[1].offset = e->register_index; + param->write_mask = e->mask; ++ins; } -- GitLab https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/446
I can confirm this fixes some crashes I've seen on hull shaders from GTA V. -- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/446#note_51301
I suppose getting test coverage for this isn't straightforward, right? -- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/446#note_51359
This merge request was approved by Henri Verbeet. -- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/446
Actually, you're right, it shouldn't be that hard, and I realized that too after sending the patch. I'll try to write something. -- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/446#note_51375
participants (4)
-
Giovanni Mascellani (@giomasce) -
Henri Verbeet (@hverbeet) -
Zebediah Figura -
Zebediah Figura (@zfigura)