mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
tests: Add a test for loading from nonzero mipmap levels.
This commit is contained in:
parent
c940486a89
commit
e3eb4fc5eb
Notes:
Alexandre Julliard
2023-05-08 22:34:30 +02:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/191
@ -133,6 +133,7 @@ vkd3d_shader_tests = \
|
||||
tests/hlsl-vector-indexing.shader_test \
|
||||
tests/hlsl-vector-indexing-uniform.shader_test \
|
||||
tests/lit.shader_test \
|
||||
tests/load-level.shader_test \
|
||||
tests/log.shader_test \
|
||||
tests/logic-operations.shader_test \
|
||||
tests/majority-syntax.shader_test \
|
||||
|
51
tests/load-level.shader_test
Normal file
51
tests/load-level.shader_test
Normal file
@ -0,0 +1,51 @@
|
||||
[require]
|
||||
shader model >= 4.0
|
||||
|
||||
[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]
|
||||
sampler s;
|
||||
Texture2D t;
|
||||
uniform uint level;
|
||||
|
||||
float4 main() : sv_target
|
||||
{
|
||||
return t.Load(uint3(0, 0, level));
|
||||
}
|
||||
|
||||
[test]
|
||||
uniform 0 uint 0
|
||||
draw quad
|
||||
probe all rgba (1.0, 0.0, 1.0, 0.0)
|
||||
uniform 0 uint 1
|
||||
draw quad
|
||||
probe all rgba (0.0, 0.0, 1.0, 0.0)
|
||||
|
||||
[pixel shader fail]
|
||||
sampler s;
|
||||
Texture2D t;
|
||||
|
||||
float4 main() : sv_target
|
||||
{
|
||||
return t[uint3(0, 0, 0)];
|
||||
}
|
||||
|
||||
[pixel shader]
|
||||
sampler s;
|
||||
Texture2D t;
|
||||
|
||||
float4 main() : sv_target
|
||||
{
|
||||
return t[uint2(0, 0)];
|
||||
}
|
||||
|
||||
[test]
|
||||
draw quad
|
||||
probe all rgba (1.0, 0.0, 1.0, 0.0)
|
Loading…
Reference in New Issue
Block a user