mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
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).
This commit is contained in:
parent
5cb17cfd1c
commit
b1123ed35f
Notes:
Alexandre Julliard
2023-11-20 22:33:01 +01:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/481
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user