Skip to content
Snippets Groups Projects
Commit a43242a3 authored by Giovanni Mascellani's avatar Giovanni Mascellani Committed by Alexandre Julliard
Browse files

tests: Test length() intrinsic.

parent 303ce66c
No related branches found
No related tags found
1 merge request!28Support length(), int division and int absolute value.
......@@ -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 \
......
[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);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment