mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-01-28 13:05:02 -08:00
tests: Test length() intrinsic.
This commit is contained in:
parent
303ce66cef
commit
a43242a3e6
Notes:
Alexandre Julliard
2022-10-18 00:13:00 +02:00
Approved-by: Zebediah Figura (@zfigura) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/28
@ -90,6 +90,7 @@ vkd3d_shader_tests = \
|
||||
tests/hlsl-intrinsic-override.shader_test \
|
||||
tests/hlsl-invalid.shader_test \
|
||||
tests/hlsl-ldexp.shader_test \
|
||||
tests/hlsl-length.shader_test \
|
||||
tests/hlsl-lerp.shader_test \
|
||||
tests/hlsl-majority-pragma.shader_test \
|
||||
tests/hlsl-majority-typedef.shader_test \
|
||||
|
80
tests/hlsl-length.shader_test
Normal file
80
tests/hlsl-length.shader_test
Normal file
@ -0,0 +1,80 @@
|
||||
[pixel shader]
|
||||
uniform float4 x;
|
||||
|
||||
float4 main() : SV_TARGET
|
||||
{
|
||||
return length(x);
|
||||
}
|
||||
|
||||
[test]
|
||||
uniform 0 float4 2.0 3.0 4.0 5.0
|
||||
todo draw quad
|
||||
probe all rgba (7.34846926, 7.34846926, 7.34846926, 7.34846926) 1
|
||||
|
||||
[pixel shader]
|
||||
uniform float3 x;
|
||||
|
||||
float4 main() : SV_TARGET
|
||||
{
|
||||
return length(x);
|
||||
}
|
||||
|
||||
[test]
|
||||
uniform 0 float4 2.0 3.0 4.0 0.0
|
||||
todo draw quad
|
||||
probe all rgba (5.38516474, 5.38516474, 5.38516474, 5.38516474) 1
|
||||
|
||||
[pixel shader]
|
||||
uniform float2 x;
|
||||
|
||||
float4 main() : SV_TARGET
|
||||
{
|
||||
return length(x);
|
||||
}
|
||||
|
||||
[test]
|
||||
uniform 0 float4 2.0 3.0 0.0 0.0
|
||||
todo draw quad
|
||||
probe all rgba (3.60555124, 3.60555124, 3.60555124, 3.60555124) 1
|
||||
|
||||
[pixel shader]
|
||||
uniform float1 x;
|
||||
|
||||
float4 main() : SV_TARGET
|
||||
{
|
||||
return length(x);
|
||||
}
|
||||
|
||||
[test]
|
||||
uniform 0 float4 2.0 0.0 0.0 0.0
|
||||
todo draw quad
|
||||
probe all rgba (2.0, 2.0, 2.0, 2.0)
|
||||
|
||||
[pixel shader]
|
||||
uniform float x;
|
||||
|
||||
float4 main() : SV_TARGET
|
||||
{
|
||||
return length(x);
|
||||
}
|
||||
|
||||
[test]
|
||||
uniform 0 float4 2.0 0.0 0.0 0.0
|
||||
todo draw quad
|
||||
probe all rgba (2.0, 2.0, 2.0, 2.0)
|
||||
|
||||
[pixel shader fail]
|
||||
uniform float1x3 x;
|
||||
|
||||
float4 main() : SV_TARGET
|
||||
{
|
||||
return length(x);
|
||||
}
|
||||
|
||||
[pixel shader fail]
|
||||
uniform float4x1 x;
|
||||
|
||||
float4 main() : SV_TARGET
|
||||
{
|
||||
return length(x);
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user