17 Apr
2023
17 Apr
'23
9:36 a.m.
Giovanni Mascellani (@giomasce) commented about tests/hlsl-trunc.shader_test:
+[test] +uniform 0 float4 -0.5 6.5 7.5 3.4 +draw quad +probe all rgba (0.0, 6.0, 7.0, 3.0) 4 +uniform 0 float4 -1.5 6.5 7.5 3.4 +draw quad +probe all rgba (-1.0, 6.0, 7.0, 3.0) 4 + +[pixel shader] +float4 main(uniform float4 u) : sv_target +{ + float a = trunc(u.r); + int2 b = trunc(u.gb); + float4 res = float4(b, a, u.a); + return floor(res); +} I wonder what's the reason for such a complicated test. It seems that the tests for `floor()` already had something like that, but I don't completely understand what's the value.
-- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/161#note_30222