Skip to content
Snippets Groups Projects
Commit c3f10fe2 authored by Ethan Lee's avatar Ethan Lee Committed by Alexandre Julliard
Browse files

tests: Add a test for SampleGrad() method.

parent 1af662ae
No related branches found
No related tags found
1 merge request!184vkd3d-shader/hlsl: Add support for SampleGrad() method
......@@ -158,6 +158,7 @@ vkd3d_shader_tests = \
tests/return.shader_test \
tests/round.shader_test \
tests/sample-bias.shader_test \
tests/sample-grad.shader_test \
tests/sample-level.shader_test \
tests/sampler.shader_test \
tests/sampler-offset.shader_test \
......
[require]
shader model >= 4.0
[sampler 0]
filter linear linear linear
address clamp clamp clamp
[texture 0]
size (2, 2)
levels 2
1.0 0.0 1.0 0.0 1.0 0.0 1.0 0.0
1.0 0.0 1.0 0.0 1.0 0.0 1.0 0.0
0.0 0.0 1.0 0.0
[pixel shader todo]
sampler s;
Texture2D t;
uniform float4 grad;
float4 main() : sv_target
{
return t.SampleGrad(s, float2(0.5, 0.5), grad.xy, grad.zw);
}
[test]
uniform 0 float4 0.0 0.0 0.0 0.0
todo draw quad
todo probe all rgba (1.0, 0.0, 1.0, 0.0)
uniform 0 float4 1.0 1.0 1.0 1.0
todo draw quad
todo probe all rgba (0.0, 0.0, 1.0, 0.0)
uniform 0 float4 2.0 2.0 2.0 2.0
todo draw quad
todo probe all rgba (0.0, 0.0, 1.0, 0.0)
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