vkd3d-shader/hlsl: Delay lowering complex casts until after parse time.

While so far it has been posible to do this at parse time, this must
happen after knowing if the complex cast is on the lhs or not.

The modified tests show that before this patch we are currently
miscompiling when this happens, because a complex lhs cast is transformed
into a load, and add_assigment() just stores to the generated "cast"
temp.
This commit is contained in:
Francisco Casas
2025-01-16 17:08:24 -03:00
committed by Henri Verbeet
parent dc37d90190
commit c2e224c5fb
Notes: Henri Verbeet 2025-01-22 15:04:09 +01:00
Approved-by: Elizabeth Figura (@zfigura)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1350
5 changed files with 111 additions and 93 deletions

View File

@@ -176,7 +176,7 @@ float4 main() : sv_target
}
[pixel shader fail(sm>=4) todo(sm>=4)]
[pixel shader fail(sm>=4) todo]
void fun(out float4 f)
{
f = float4(1.1, 2.3, 3.6, 4.3);
@@ -191,5 +191,5 @@ float4 main() : sv_target
}
[test]
todo(sm>=4) draw quad
todo(sm<4) probe (0, 0) rgba(1.1, 2.3, 3.6, 4.3)
todo draw quad
probe (0, 0) rgba(1.1, 2.3, 3.6, 4.3)