mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-01-28 13:05:02 -08:00
tests: Add a test for SampleGrad() method.
Signed-off-by: Ethan Lee <flibitijibibo@gmail.com>
This commit is contained in:
parent
1af662ae50
commit
c3f10fe271
Notes:
Alexandre Julliard
2023-05-23 23:13:12 +02:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Zebediah Figura (@zfigura) Approved-by: Francisco Casas (@fcasas) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/184
@ -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 \
|
||||
|
36
tests/sample-grad.shader_test
Normal file
36
tests/sample-grad.shader_test
Normal file
@ -0,0 +1,36 @@
|
||||
[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)
|
Loading…
x
Reference in New Issue
Block a user