mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
tests: Move HLSL tests to a subdirectory.
This commit is contained in:
committed by
Alexandre Julliard
parent
69f32796b0
commit
0d2f2e1860
Notes:
Alexandre Julliard
2023-06-28 23:04:19 +02:00
Approved-by: Giovanni Mascellani (@giomasce) 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/248
63
tests/hlsl/swizzle-constant-prop.shader_test
Normal file
63
tests/hlsl/swizzle-constant-prop.shader_test
Normal file
@@ -0,0 +1,63 @@
|
||||
% The texel offset argument to Load() must resolve to a constant integer;
|
||||
% make sure that we can do so.
|
||||
|
||||
[require]
|
||||
shader model >= 4.0
|
||||
|
||||
|
||||
[texture 0]
|
||||
size (4, 4)
|
||||
1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 4
|
||||
5 5 5 5 6 6 6 6 7 7 7 7 8 8 8 8
|
||||
9 9 9 9 10 10 10 10 11 11 11 11 12 12 12 12
|
||||
13 13 13 13 14 14 14 14 14 15 15 15 16 16 16 16
|
||||
|
||||
|
||||
[pixel shader]
|
||||
Texture2D tex;
|
||||
uniform int i;
|
||||
|
||||
float4 main() : sv_target
|
||||
{
|
||||
int4 a = {1, 2, i, i};
|
||||
return 100 * a + tex.Load(int3(0, 0, 0), a.xy);
|
||||
}
|
||||
|
||||
[test]
|
||||
uniform 0 int 4
|
||||
draw quad
|
||||
probe all rgba (110, 210, 410, 410)
|
||||
|
||||
|
||||
[pixel shader]
|
||||
Texture2D tex;
|
||||
uniform int i;
|
||||
|
||||
float4 main() : sv_target
|
||||
{
|
||||
int4 a = {0, 1, 2, i};
|
||||
int4 b = a.yxww;
|
||||
int3 c = b.wyx;
|
||||
return 100 * b + tex.Load(int3(0, 0, 0), c.yz);
|
||||
}
|
||||
|
||||
[test]
|
||||
uniform 0 int 3
|
||||
draw quad
|
||||
probe all rgba (105, 5, 305, 305)
|
||||
|
||||
|
||||
[pixel shader]
|
||||
Texture2D tex;
|
||||
uniform int i;
|
||||
|
||||
float4 main() : sv_target
|
||||
{
|
||||
int4 a = {1, 2, 3, i};
|
||||
return tex.Load(int3(0, 0, 0), a.wzxx.yxw.zx);
|
||||
}
|
||||
|
||||
[test]
|
||||
uniform 0 int 1
|
||||
draw quad
|
||||
probe all rgba (14.0, 14.0, 14.0, 14.0)
|
Reference in New Issue
Block a user