mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/hlsl: Don't forbid first base type cast on var assignments.
This commit is contained in:
committed by
Henri Verbeet
parent
0a15ab702f
commit
4d18fb39b6
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
@@ -25,7 +25,7 @@ probe (0, 0) rgba (-1.0, -1.0, 2.0, 4.0)
|
||||
% In SM 6 a cast seems to implicitly promote the type to const,
|
||||
% so it fails to match the parameter of func().
|
||||
|
||||
[pixel shader fail(sm>=6) todo(sm>=4)]
|
||||
[pixel shader fail(sm>=6)]
|
||||
|
||||
uniform float4 f;
|
||||
|
||||
@@ -43,12 +43,12 @@ float4 main() : sv_target
|
||||
|
||||
[test]
|
||||
uniform 0 float4 -1.9 -1.0 2.9 4.0
|
||||
todo(sm>=4) draw quad
|
||||
draw quad
|
||||
probe (0, 0) rgba (-1.0, -1.0, 2.0, 4.0)
|
||||
|
||||
% As above, but declare "x" as float4 and cast it to int4.
|
||||
|
||||
[pixel shader fail(sm>=6) todo(sm>=4)]
|
||||
[pixel shader fail(sm>=6)]
|
||||
|
||||
uniform float4 f;
|
||||
|
||||
@@ -66,7 +66,7 @@ float4 main() : sv_target
|
||||
|
||||
[test]
|
||||
uniform 0 float4 -1.9 -1.0 2.9 4.0
|
||||
todo(sm>=4) draw quad
|
||||
draw quad
|
||||
probe (0, 0) rgba (-1.0, -1.0, 2.0, 4.0)
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ probe (0, 0) rgba (-1.0, 0.0, 1.0, -3000000.0) 4
|
||||
|
||||
|
||||
% An explicit cast gets applied right before assignment, as if it was on the lhs.
|
||||
[pixel shader fail(sm>=6) todo(sm>=4)]
|
||||
[pixel shader fail(sm>=6)]
|
||||
void fun(out float4 f)
|
||||
{
|
||||
f = float4(1.4, 2.6, 3.9, 4.3);
|
||||
@@ -108,7 +108,7 @@ float4 main() : sv_target
|
||||
}
|
||||
|
||||
[test]
|
||||
todo(sm>=4) draw quad
|
||||
draw quad
|
||||
probe (0, 0) rgba(1, 2, 3, 4)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user