2022-12-09 15:02:03 -08:00
|
|
|
% The texel offset argument to Load() must resolve to a constant integer;
|
|
|
|
% make sure that we can do so.
|
|
|
|
|
|
|
|
[require]
|
|
|
|
shader model >= 4.0
|
|
|
|
|
|
|
|
|
2024-01-24 11:11:17 -08:00
|
|
|
[srv 0]
|
|
|
|
size (2d, 4, 4)
|
2022-12-09 15:02:03 -08:00
|
|
|
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
|
|
|
|
|
|
|
|
|
2023-01-12 15:26:03 -08:00
|
|
|
[pixel shader]
|
2022-12-09 15:02:03 -08:00
|
|
|
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
|
2024-03-19 04:36:23 -07:00
|
|
|
todo(glsl) draw quad
|
2024-02-10 11:16:22 -08:00
|
|
|
probe (0, 0) rgba (110, 210, 410, 410)
|
2022-12-09 15:02:03 -08:00
|
|
|
|
|
|
|
|
2022-12-09 14:23:41 -08:00
|
|
|
[pixel shader]
|
2022-12-09 15:02:03 -08:00
|
|
|
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
|
2024-03-19 04:36:23 -07:00
|
|
|
todo(glsl) draw quad
|
2024-02-10 11:16:22 -08:00
|
|
|
probe (0, 0) rgba (105, 5, 305, 305)
|
2022-12-09 15:02:03 -08:00
|
|
|
|
|
|
|
|
2022-12-09 14:23:41 -08:00
|
|
|
[pixel shader]
|
2022-12-09 15:02:03 -08:00
|
|
|
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
|
2024-03-19 04:36:23 -07:00
|
|
|
todo(glsl) draw quad
|
2024-02-10 11:16:22 -08:00
|
|
|
probe (0, 0) rgba (14.0, 14.0, 14.0, 14.0)
|