mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-01-28 13:05:02 -08:00
tests: Test casting negative floats to int.
Turns out we are not doing this correctly in SM1, because the rounding should be to the number that is closer to zero and lower_casts_to_int() doesn't do that. A vertex shader test is added since in SM1 they must rely on the SLT operation instead of the CMP operation.
This commit is contained in:
parent
efd7f2e014
commit
4f7c117296
Notes:
Henri Verbeet
2025-01-16 19:29:44 +01:00
Approved-by: Elizabeth Figura (@zfigura) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1339
@ -9,9 +9,30 @@ float4 main() : sv_target
|
||||
}
|
||||
|
||||
[test]
|
||||
uniform 0 float4 10.3 11.5 12.8 13.1
|
||||
uniform 0 float4 10.3 -11.6 12.8 13.1
|
||||
draw quad
|
||||
probe (0, 0) rgba (10, 11, 12, 0)
|
||||
todo(sm<4) probe (0, 0) rgba(10, -11, 12, 0)
|
||||
|
||||
|
||||
[vertex shader]
|
||||
uniform float4 f;
|
||||
|
||||
void main(float4 pos : position, out float4 t1 : TEXCOORD1, out float4 out_pos : sv_position)
|
||||
{
|
||||
out_pos = pos;
|
||||
t1 = (int4)f;
|
||||
}
|
||||
|
||||
[pixel shader]
|
||||
float4 main(float4 t1 : TEXCOORD1) : sv_target
|
||||
{
|
||||
return t1;
|
||||
}
|
||||
|
||||
[test]
|
||||
uniform 0 float4 -0.4 -0.7 -12.8 14.8
|
||||
draw quad
|
||||
todo(sm<4) probe (0, 0) rgba(0, 0, -12, 14)
|
||||
|
||||
|
||||
[pixel shader todo(sm<4)]
|
||||
|
Loading…
x
Reference in New Issue
Block a user