[PATCH 0/1] MR481: vkd3d-shader/ir: Correctly compute the TEMP count after hull shader flattening.
The previous computation was incorrect because the count was taken after resetting it to zero (as part of setting the instruction to NOP). -- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/481
From: Giovanni Mascellani <gmascellani(a)codeweavers.com> The previous computation was incorrect because the count was taken after resetting it to zero (as part of setting the instruction to NOP). --- libs/vkd3d-shader/ir.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libs/vkd3d-shader/ir.c b/libs/vkd3d-shader/ir.c index 2a3343994..6926de927 100644 --- a/libs/vkd3d-shader/ir.c +++ b/libs/vkd3d-shader/ir.c @@ -207,10 +207,15 @@ static void flattener_eliminate_phase_related_dcls(struct hull_flattener *normal { /* Leave only the first temp declaration and set it to the max count later. */ if (!normaliser->max_temp_count) + { + normaliser->max_temp_count = ins->declaration.count; normaliser->temp_dcl_idx = index; + } else + { + normaliser->max_temp_count = max(normaliser->max_temp_count, ins->declaration.count); vkd3d_shader_instruction_make_nop(ins); - normaliser->max_temp_count = max(normaliser->max_temp_count, ins->declaration.count); + } return; } -- GitLab https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/481
This merge request was approved by Giovanni Mascellani. -- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/481
This merge request was approved by Henri Verbeet. -- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/481
participants (3)
-
Giovanni Mascellani -
Giovanni Mascellani (@giomasce) -
Henri Verbeet (@hverbeet)