mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
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:
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
@@ -30,7 +30,7 @@ probe (0, 0) rgba(-1, -2, 4, 0)
|
||||
|
||||
% Casts don't actually perform base type changes, only the outtermost one, which
|
||||
% I suspect is because the implicit cast on the assignment and not the cast itself.
|
||||
[pixel shader fail(sm>=4) todo(sm>=4)]
|
||||
[pixel shader fail(sm>=4) todo]
|
||||
float4 main() : sv_target
|
||||
{
|
||||
float4 f = 0;
|
||||
@@ -40,8 +40,8 @@ float4 main() : sv_target
|
||||
}
|
||||
|
||||
[test]
|
||||
todo(sm>=4) draw quad
|
||||
todo probe (0, 0) rgba(1.3, -2.4, 3.3, 4.7)
|
||||
todo draw quad
|
||||
probe (0, 0) rgba(1.3, -2.4, 3.3, 4.7)
|
||||
|
||||
|
||||
[pixel shader fail(sm>=4) todo]
|
||||
@@ -69,7 +69,7 @@ float4 main() : sv_target
|
||||
}
|
||||
|
||||
|
||||
[pixel shader fail(sm>=6)]
|
||||
[pixel shader fail(sm>=6) todo]
|
||||
float4 main() : sv_target
|
||||
{
|
||||
float4 f = 0;
|
||||
@@ -79,8 +79,8 @@ float4 main() : sv_target
|
||||
}
|
||||
|
||||
[test]
|
||||
draw quad
|
||||
todo probe (0, 0) rgba(1, 2, 3, 4)
|
||||
todo draw quad
|
||||
probe (0, 0) rgba(1, 2, 3, 4)
|
||||
|
||||
|
||||
[pixel shader fail(sm>=4) todo]
|
||||
|
Reference in New Issue
Block a user