Module: vkd3d Branch: master Commit: 588645a79a8fbd87b329ee516ac054d83b31322a URL: https://gitlab.winehq.org/wine/vkd3d/-/commit/588645a79a8fbd87b329ee516ac054...
Author: Francisco Casas fcasas@codeweavers.com Date: Fri Oct 14 13:08:30 2022 -0300
tests: Add additional tests for explicit casts with vectors.
---
tests/cast-componentwise-compatible.shader_test | 55 +++++++++++++++++++++++++ 1 file changed, 55 insertions(+)
diff --git a/tests/cast-componentwise-compatible.shader_test b/tests/cast-componentwise-compatible.shader_test index 4b342efb..f8b990d0 100644 --- a/tests/cast-componentwise-compatible.shader_test +++ b/tests/cast-componentwise-compatible.shader_test @@ -183,3 +183,58 @@ float4 main() : sv_target [test] draw quad probe all rgba (10.0, 10.0, 11.4, 12.4) + + +[pixel shader] +float4 main() : sv_target +{ + float f[5] = {11, 12, 13, 14, 15}; + int4 i; + + i = (int4) f; + return i; +} + + +[test] +draw quad +probe all rgba (11.0, 12.0, 13.0, 14.0) + + +[pixel shader] +struct apple +{ + int2 aa; + float bb[2]; + float cc; +}; + +float4 main() : sv_target +{ + struct apple a = {21, 22, 23.4, 24.4, 25.0}; + int4 i; + + i = (int4) a; + return i; +} + + +[test] +draw quad +probe all rgba (21.0, 22.0, 23.0, 24.0) + + +[pixel shader] +float4 main() : sv_target +{ + float4 f = {31.4, 32.4, 33.4, 34.4}; + int3 i; + + i = (int3) f; + return float4(i.x, i.y, i.z, i.z); +} + + +[test] +draw quad +probe all rgba (31.0, 32.0, 33.0, 33.0)