tests/shader-runner: Change resource declaration syntax on shader_test files.

On shader_test files, now resources should be declared this way:

    [texture n]       -> [srv n]
    [srv buffer n]    -> [srv n]
    [uav n]           -> [uav n]
    [uav buffer n]    -> [uav n]
    [vertex buffer n] -> [vb n]
    [render target n] -> [rtv n]

The dimension (buffer or 2D) is now specified as an additional parameter
in the "size" directive:

  For 2D resources:
  size (n, m)         -> size (2d, n, m)

  For buffers:
  size (n, 1)         -> size (buffer, n)
This commit is contained in:
Francisco Casas 2024-01-24 16:11:17 -03:00 committed by Alexandre Julliard
parent 4d855611b7
commit b08be04465
Notes: Alexandre Julliard 2024-02-19 22:59:16 +01:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Zebediah Figura (@zfigura)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/569
38 changed files with 190 additions and 219 deletions

View File

@ -5,7 +5,7 @@ shader model >= 4.0
0 r32g32b32a32 uint apple
0 r32g32 int sv_position
[vertex buffer 0]
[vb 0]
format r32 uint
0 1 0x80000000 0xffffffff -2 -2
0 1 0x80000000 0xffffffff -2 2

View File

@ -471,8 +471,8 @@ float4 main() : sv_target
}
[texture 0]
size (1, 1)
[srv 0]
size (2d, 1, 1)
0.0 0.0 0.0 4.0
[sampler 0]
@ -527,12 +527,12 @@ float4 main() : sv_target
}
[texture 0]
size (1, 1)
[srv 0]
size (2d, 1, 1)
1.0 1.0 1.0 1.0
[texture 1]
size (1, 1)
[srv 1]
size (2d, 1, 1)
2.0 2.0 2.0 2.0
@ -698,8 +698,8 @@ float4 main() : sv_target
[require]
shader model >= 5.0
[texture 0]
size (1, 1)
[srv 0]
size (2d, 1, 1)
0.0 0.0 0.0 0.5
[pixel shader]

View File

@ -16,24 +16,24 @@ address clamp clamp clamp
filter linear linear linear
address clamp clamp clamp
[texture 0]
size (1, 1)
[srv 0]
size (2d, 1, 1)
0.0 0.0 0.0 1.0
[texture 1]
size (1, 1)
[srv 1]
size (2d, 1, 1)
1.0 1.0 1.0 1.0
[texture 2]
size (1, 1)
[srv 2]
size (2d, 1, 1)
2.0 2.0 2.0 1.0
[texture 3]
size (1, 1)
[srv 3]
size (2d, 1, 1)
3.0 3.0 3.0 1.0
[texture 4]
size (1, 1)
[srv 4]
size (2d, 1, 1)
4.0 4.0 4.0 1.0
[pixel shader]

View File

@ -3,7 +3,7 @@ shader model >= 5.0
[uav 0]
format r32 float
size (1, 1)
size (2d, 1, 1)
0.1

View File

@ -6,8 +6,8 @@ shader model >= 4.1
filter linear linear linear
address clamp clamp clamp
[texture 0]
size (3, 3)
[srv 0]
size (2d, 3, 3)
0.0 0.0 0.0 0.4 0.1 0.0 0.5 0.0 0.2 0.0 0.0 0.4
0.0 0.1 0.5 0.0 0.1 0.1 0.0 0.4 0.2 0.1 0.5 0.0
0.0 0.2 0.0 0.4 0.1 0.2 0.5 0.0 0.2 0.2 0.0 0.4

View File

@ -6,8 +6,8 @@ shader model >= 4.1
filter linear linear linear
address clamp clamp clamp
[texture 0]
size (3, 3)
[srv 0]
size (2d, 3, 3)
0.0 0.0 0.0 0.4 0.1 0.0 0.5 0.0 0.2 0.0 0.0 0.4
0.0 0.1 0.5 0.0 0.1 0.1 0.0 0.4 0.2 0.1 0.5 0.0
0.0 0.2 0.0 0.4 0.1 0.2 0.5 0.0 0.2 0.2 0.0 0.4

View File

@ -1,8 +1,8 @@
[require]
shader model >= 4.0
[texture 0]
size (2, 3)
[srv 0]
size (2d, 2, 3)
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 1.0 0.0 1.0 0.0 1.0 0.0 1.0 0.0
@ -31,8 +31,8 @@ float4 main() : sv_target
todo(sm>=6) draw quad
probe all rgba (2.0, 3.0, 2.0, 3.0)
[texture 1]
size (2, 2)
[srv 1]
size (2d, 2, 2)
levels 2
1.0 0.0 1.0 0.0 1.0 0.0 1.0 0.0

View File

@ -1,14 +1,14 @@
[require]
shader model >= 4.0
[texture 0]
size (3, 3)
[srv 0]
size (2d, 3, 3)
0.1 0.1 0.1 0.1 0.2 0.2 0.2 0.2 0.3 0.3 0.3 0.3
0.4 0.4 0.4 0.4 0.5 0.5 0.5 0.5 0.6 0.6 0.6 0.6
0.7 0.7 0.7 0.7 0.8 0.8 0.8 0.8 0.9 0.9 0.9 0.9
[texture 1]
size (2, 2)
[srv 1]
size (2d, 2, 2)
0.1 0.1 0.1 0.0 0.2 0.2 0.2 0.0
0.4 0.4 0.4 0.0 0.5 0.5 0.5 0.0

View File

@ -4,7 +4,7 @@ shader model >= 4.0
[input layout]
0 r32g32 float sv_position
[vertex buffer 0]
[vb 0]
-2.0 -2.0
2.0 -2.0
-2.0 2.0
@ -25,7 +25,7 @@ float4 main(bool face : sv_isfrontface) : sv_target
draw triangle strip 4
probe all rgba (0.0, 1.0, 0.0, 1.0)
[vertex buffer 0]
[vb 0]
-2.0 -2.0
-2.0 2.0
2.0 -2.0

View File

@ -1,8 +1,8 @@
[require]
shader model >= 4.0
[texture 0]
size (2, 2)
[srv 0]
size (2d, 2, 2)
levels 2
1.0 0.0 1.0 0.0 1.0 0.0 1.0 0.0

View File

@ -21,21 +21,21 @@ row_major float1x4 main() : sv_target
draw quad
probe all rgba (1.0, 2.0, 3.0, 4.0)
[render target 0]
[rtv 0]
format r32 float
size (640, 480)
size (2d, 640, 480)
[render target 1]
[rtv 1]
format r32 float
size (640, 480)
size (2d, 640, 480)
[render target 2]
[rtv 2]
format r32 float
size (640, 480)
size (2d, 640, 480)
[render target 3]
[rtv 3]
format r32 float
size (640, 480)
size (2d, 640, 480)
[pixel shader fail(sm>=6)]
row_major float4x1 main() : sv_target
@ -84,9 +84,9 @@ probe render target 1 all r (2.0)
probe render target 2 all r (5.0)
probe render target 3 all r (6.0)
[render target 0]
[rtv 0]
format r32g32b32a32 float
size (640, 480)
size (2d, 640, 480)
[pixel shader fail(sm>=6)]
void main(out row_major float1x4 x : sv_target0, out float1x2 y : sv_target1)

View File

@ -1,10 +1,10 @@
[render target 0]
[rtv 0]
format r32g32b32a32 float
size (640, 480)
size (2d, 640, 480)
[render target 1]
[rtv 1]
format r32g32b32a32 float
size (640, 480)
size (2d, 640, 480)
[pixel shader]
void main(out float4 o0 : sv_target0, out float4 o1 : sv_target1)

View File

@ -4,7 +4,7 @@ shader model >= 4.0
[input layout]
0 r32g32b32a32 float texcoord
[vertex buffer 0]
[vb 0]
0.0 1.0 0.0 1.0
1.0 0.0 0.0 1.0
0.0 0.0 1.0 1.0

View File

@ -166,7 +166,7 @@ void main() { func(); }
[uav 0]
format r32 float
size (2, 2)
size (2d, 2, 2)
1.0 1.0
1.0 1.0

View File

@ -48,33 +48,33 @@ float4 main(struct apple input, uniform float param) : sv_target
}
[texture 0]
size (2, 2)
[srv 0]
size (2d, 2, 2)
1.0 1.0 1.0 1.0 0.0 0.0 0.0 1.0
1.0 1.0 1.0 1.0 0.0 0.0 0.0 1.0
[texture 1]
size (2, 2)
[srv 1]
size (2d, 2, 2)
2.0 2.0 2.0 1.0 0.0 0.0 0.0 1.0
2.0 2.0 2.0 1.0 0.0 0.0 0.0 1.0
[texture 2]
size (2, 2)
[srv 2]
size (2d, 2, 2)
3.0 3.0 3.0 1.0 0.0 0.0 0.0 1.0
3.0 3.0 3.0 1.0 0.0 0.0 0.0 1.0
[texture 3]
size (2, 2)
[srv 3]
size (2d, 2, 2)
4.0 4.0 4.0 1.0 0.0 0.0 0.0 1.0
4.0 4.0 4.0 1.0 0.0 0.0 0.0 1.0
[texture 4]
size (2, 2)
[srv 4]
size (2d, 2, 2)
5.0 5.0 5.0 1.0 0.0 0.0 0.0 1.0
5.0 5.0 5.0 1.0 0.0 0.0 0.0 1.0
[texture 5]
size (2, 2)
[srv 5]
size (2d, 2, 2)
6.0 6.0 6.0 1.0 0.0 0.0 0.0 1.0
6.0 6.0 6.0 1.0 0.0 0.0 0.0 1.0

View File

@ -14,12 +14,12 @@ float4 main() : sv_target
shader model >= 4.0
[texture 0]
size (1, 1)
[srv 0]
size (2d, 1, 1)
0.77 0.77 0.77 0.77
[texture 1]
size (1, 1)
[srv 1]
size (2d, 1, 1)
0.64 0.64 0.64 0.64
[sampler 0]
@ -50,8 +50,8 @@ draw quad
probe all rgba (77.77, 77.77, 77.77, 77.77)
[texture 0]
size (2, 2)
[srv 0]
size (2d, 2, 2)
0.1 0.2 0.3 0.4 0.5 0.7 0.6 0.8
0.6 0.5 0.2 0.1 0.8 0.0 0.7 1.0
@ -80,16 +80,16 @@ probe (0, 1) rgba (0.6, 0.5, 0.2, 0.1)
probe (1, 1) rgba (0.8, 0.0, 0.7, 1.0)
[texture 0]
size (1, 1)
[srv 0]
size (2d, 1, 1)
1.0 1.0 1.0 1.0
[texture 1]
size (1, 1)
[srv 1]
size (2d, 1, 1)
2.0 2.0 2.0 1.0
[texture 2]
size (1, 1)
[srv 2]
size (2d, 1, 1)
3.0 3.0 3.0 1.0
[pixel shader]
@ -219,8 +219,8 @@ float4 main(Texture2D tex2) : sv_target
shader model >= 5.0
[texture 0]
size (1, 1)
[srv 0]
size (2d, 1, 1)
1.0 2.0 3.0 4.0
[pixel shader todo fail(sm>=6)]

View File

@ -1,17 +1,17 @@
[require]
shader model >= 5.0
[render target 0]
[rtv 0]
format r32 uint
size (640, 480)
size (2d, 640, 480)
[uav 1]
format r32 uint
size (640, 480)
size (2d, 640, 480)
[texture 0]
[srv 0]
format r32g32b32a32 uint
size (1, 1)
size (2d, 1, 1)
0 0 0 0
[vertex shader]

View File

@ -2,24 +2,24 @@
shader model >= 4.0
[texture 0]
size (1, 1)
[srv 0]
size (2d, 1, 1)
0.0 0.0 0.0 99.0
[texture 1]
size (1, 1)
[srv 1]
size (2d, 1, 1)
1.0 1.0 1.0 99.0
[texture 2]
size (1, 1)
[srv 2]
size (2d, 1, 1)
2.0 2.0 2.0 99.0
[texture 3]
size (1, 1)
[srv 3]
size (2d, 1, 1)
3.0 3.0 3.0 99.0
[texture 4]
size (1, 1)
[srv 4]
size (2d, 1, 1)
4.0 4.0 4.0 99.0
@ -175,15 +175,15 @@ probe all rgba (2.0, 2.0, 2.0, 99.0)
[require]
shader model >= 5.0
[texture 0]
size (2, 2)
[srv 0]
size (2d, 2, 2)
0.0 0.0 0.0 99.0
0.0 0.0 0.0 99.0
0.0 0.0 0.0 99.0
0.0 0.0 0.0 99.0
[texture 1]
size (2, 2)
[srv 1]
size (2d, 2, 2)
1.0 1.0 1.0 99.0
1.0 1.0 1.0 99.0
0.0 0.0 0.0 99.0

View File

@ -2,8 +2,8 @@
filter linear linear linear
address clamp clamp clamp
[texture 0]
size (2, 2)
[srv 0]
size (2d, 2, 2)
levels 2
1.0 0.0 1.0 0.0 1.0 0.0 1.0 0.0

View File

@ -5,8 +5,8 @@ shader model >= 4.0
filter linear linear linear
address clamp clamp clamp
[texture 0]
size (2, 2)
[srv 0]
size (2d, 2, 2)
levels 2
1.0 0.0 1.0 0.0 1.0 0.0 1.0 0.0

View File

@ -5,8 +5,8 @@ shader model >= 3.0
filter linear linear linear
address clamp clamp clamp
[texture 0]
size (2, 2)
[srv 0]
size (2d, 2, 2)
levels 2
1.0 0.0 1.0 0.0 1.0 0.0 1.0 0.0

View File

@ -5,8 +5,8 @@ shader model >= 4.0
filter point point point
address clamp clamp clamp
[texture 0]
size (3, 3)
[srv 0]
size (2d, 3, 3)
0.0 0.0 0.0 0.4 0.1 0.0 0.5 0.0 0.2 0.0 0.0 0.4
0.0 0.1 0.5 0.0 0.1 0.1 0.0 0.4 0.2 0.1 0.5 0.0
0.0 0.2 0.0 0.4 0.1 0.2 0.5 0.0 0.2 0.2 0.0 0.4

View File

@ -2,8 +2,8 @@
filter linear linear linear
address clamp clamp clamp
[texture 0]
size (2, 2)
[srv 0]
size (2d, 2, 2)
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0 1.0 0.0 1.0 0.0

View File

@ -9,13 +9,13 @@ shader model >= 4.0
1 r32 uint TEXCOORD 3
0 r32 float TEXCOORD 4
[vertex buffer 0]
[vb 0]
-1.0 -1.0 3.0 5.0 5.0 7.0
-1.0 1.0 3.0 5.0 5.0 7.0
1.0 -1.0 3.0 5.0 5.0 7.0
1.0 1.0 3.0 5.0 5.0 7.0
[vertex buffer 1]
[vb 1]
format r32 uint
2 6
2 6

View File

@ -3,14 +3,12 @@ shader model >= 6.0
[uav 0]
format r32 float
size (2, 2)
size (2d, 2, 2)
0.1 0.2
0.3 0.4
[uav 1]
size (1, 1)
size (2d, 1, 1)
0.5 0.6 0.7 0.8
[pixel shader]
@ -61,8 +59,7 @@ probe uav 1 (0, 0) rgba (2.0, 1.0, 4.0, 3.0)
[uav 2]
size (1, 1)
size (2d, 1, 1)
0.1 0.2 0.3 0.4
[pixel shader]
@ -95,13 +92,11 @@ probe uav 2 (0, 0) rgba (0.9, 0.8, 0.7, 0.6)
% Test that we can declare and use an array of UAVs.
[uav 1]
size (1, 1)
size (2d, 1, 1)
0.1 0.2 0.3 0.4
[uav 2]
size (1, 1)
size (2d, 1, 1)
0.5 0.6 0.7 0.8
[pixel shader]

View File

@ -2,8 +2,8 @@
shader model >= 4.0
[buffer srv 0]
size (1, 4)
[srv 0]
size (buffer, 4)
0.0 1.0 2.0 3.0
4.0 5.0 6.0 7.0
8.0 9.0 10.0 11.0
@ -44,16 +44,16 @@ todo(sm<6) draw quad
probe all rgba (4000.0, 8.0, 9.0, 10.0)
[texture 0]
size (1, 1)
[srv 0]
size (2d, 1, 1)
-1.0 -1.0 -1.0 -1.0
[sampler 0]
filter linear linear linear
address clamp clamp clamp
[buffer srv 1]
size (1, 1)
[srv 1]
size (buffer, 1)
1.0 2.0 3.0 4.0
[pixel shader todo]
@ -71,8 +71,8 @@ todo(sm<6) draw quad
probe all rgba (3.0, 4.0, -1.0, -1.0)
[buffer srv 0]
size (1, 4)
[srv 0]
size (buffer, 4)
0.0 1.0 2.0 3.0
4.0 5.0 6.0 7.0
8.0 9.0 10.0 11.0

View File

@ -61,8 +61,8 @@ filter linear linear linear
address clamp clamp clamp
[texture 0]
size (1, 1)
[srv 0]
size (2d, 1, 1)
1.0 2.0 3.0 4.0
@ -173,7 +173,7 @@ shader model >= 5.0
[uav 1]
format r32 float
size (1, 1)
size (2d, 1, 1)
0.5

View File

@ -2,7 +2,7 @@
0 r32g32b32a32 float texcoord
0 r32g32 float position
[vertex buffer 0]
[vb 0]
0.0 1.0 0.0 1.0 -2.0 -2.0
0.0 1.0 0.0 1.0 -2.0 2.0
0.0 1.0 0.0 1.0 2.0 -2.0

View File

@ -5,8 +5,8 @@
shader model >= 4.0
[texture 0]
size (4, 4)
[srv 0]
size (2d, 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

View File

@ -1,8 +1,8 @@
[require]
shader model >= 4.0
[texture 0]
size (3, 3)
[srv 0]
size (2d, 3, 3)
0 0 0 1 1 0 0 1 2 0 0 1
0 1 0 1 1 1 0 1 2 1 0 1
0 2 0 1 1 2 0 1 2 2 0 1

View File

@ -18,21 +18,21 @@ float4 main() : sv_target
return float4(0, 0, 0, 0);
}
[texture 0]
[srv 0]
format r32 float
size (1, 1)
size (2d, 1, 1)
0.8
[texture 1]
[srv 1]
format r32 sint
size (1, 1)
size (2d, 1, 1)
-3
[texture 2]
[srv 2]
format r32g32 uint
size (1, 1)
size (2d, 1, 1)
4294967295 123

View File

@ -1,8 +1,8 @@
[require]
shader model >= 4.0
[texture 0]
size (2, 2)
[srv 0]
size (2d, 2, 2)
0.1 0.2 0.3 0.4 0.5 0.7 0.6 0.8
0.6 0.5 0.2 0.1 0.8 0.0 0.7 1.0

View File

@ -30,44 +30,44 @@ address clamp clamp clamp
filter linear linear linear
address clamp clamp clamp
[texture 0]
size (1, 1)
[srv 0]
size (2d, 1, 1)
0.0 0.0 0.0 1.0
[texture 1]
size (1, 1)
[srv 1]
size (2d, 1, 1)
1.0 1.0 1.0 1.0
[texture 2]
size (1, 1)
[srv 2]
size (2d, 1, 1)
2.0 2.0 2.0 1.0
[texture 3]
size (1, 1)
[srv 3]
size (2d, 1, 1)
3.0 3.0 3.0 1.0
[texture 4]
size (1, 1)
[srv 4]
size (2d, 1, 1)
4.0 4.0 4.0 1.0
[texture 5]
size (1, 1)
[srv 5]
size (2d, 1, 1)
5.0 5.0 5.0 1.0
[texture 6]
size (1, 1)
[srv 6]
size (2d, 1, 1)
6.0 6.0 6.0 1.0
[texture 7]
size (1, 1)
[srv 7]
size (2d, 1, 1)
7.0 7.0 7.0 1.0
[texture 8]
size (1, 1)
[srv 8]
size (2d, 1, 1)
8.0 8.0 8.0 1.0
[texture 9]
size (1, 1)
[srv 9]
size (2d, 1, 1)
9.0 9.0 9.0 1.0

View File

@ -3,13 +3,13 @@ shader model >= 5.0
[uav 0]
format r32 float
size (3, 1)
size (2d, 3, 1)
0.1 0.2 0.3
[uav 1]
format r32 float
size (1, 1)
size (2d, 1, 1)
0.5

View File

@ -3,7 +3,7 @@ shader model >= 5.0
[uav 0]
format r32g32b32a32 float
size (1, 1)
size (2d, 1, 1)
0.1 0.2 0.3 0.4
@ -31,7 +31,7 @@ probe uav 0 (0, 0) rgba (0.4, 0.1, 0.2, 0.3)
[uav 0]
format r32 float
size (1, 1)
size (2d, 1, 1)
0.1

View File

@ -6,9 +6,9 @@ shader model >= 5.0
% lower than the highest render target.
% This ceases to be true with shader model 5.1.
[render target 1]
[rtv 1]
format r32g32b32a32 float
size (640, 480)
size (2d, 640, 480)
[pixel shader]
struct s
@ -164,9 +164,8 @@ float4 main() : sv_target1
return 0;
}
[buffer uav 2]
size (1, 1)
[uav 2]
size (buffer, 1)
0.1 0.2 0.3 0.4
[pixel shader]

View File

@ -26,13 +26,13 @@ float4 main() : sv_target
[uav 1]
format r32 float
size (2, 2)
size (2d, 2, 2)
0.1 0.2
0.3 0.4
[uav 2]
size (1, 1)
size (2d, 1, 1)
0.5 0.6 0.7 0.8
@ -63,12 +63,12 @@ probe uav 2 (0, 0) rgba (2.0, 1.0, 4.0, 3.0)
% lower than the highest render target.
% This ceases to be true with shader model 5.1.
[render target 1]
[rtv 1]
format r32g32b32a32 float
size (640, 480)
size (2d, 640, 480)
[uav 2]
size (1, 1)
size (2d, 1, 1)
0.1 0.2 0.3 0.4
@ -105,7 +105,7 @@ probe uav 2 (0, 0) rgba (0.9, 0.8, 0.7, 0.6)
[uav 3]
size (1, 1)
size (2d, 1, 1)
0.1 0.2 0.3 0.4
@ -139,12 +139,12 @@ probe uav 3 (0, 0) rgba (0.9, 0.8, 0.7, 0.6)
% Test that we can declare and use an array of UAVs.
[uav 2]
size (1, 1)
size (2d, 1, 1)
0.1 0.2 0.3 0.4
[uav 3]
size (1, 1)
size (2d, 1, 1)
0.5 0.6 0.7 0.8

View File

@ -418,17 +418,25 @@ static void parse_sampler_directive(struct sampler *sampler, const char *line)
static void parse_resource_directive(struct resource_params *resource, const char *line)
{
int ret;
if (match_string(line, "format", &line))
{
resource->format = parse_format(line, &resource->data_type, &resource->texel_size, &line);
}
else if (match_string(line, "size", &line))
{
ret = sscanf(line, "( %u , %u )", &resource->width, &resource->height);
if (ret < 2)
fatal_error("Malformed texture size '%s'.\n", line);
if (sscanf(line, "( buffer , %u ) ", &resource->width) == 1)
{
resource->dimension = RESOURCE_DIMENSION_BUFFER;
resource->height = 1;
}
else if (sscanf(line, "( 2d , %u , %u ) ", &resource->width, &resource->height) == 2)
{
resource->dimension = RESOURCE_DIMENSION_2D;
}
else
{
fatal_error("Malformed resource size '%s'.\n", line);
}
}
else if (match_string(line, "levels", &line))
{
@ -1541,7 +1549,7 @@ void run_shader_tests(struct shader_runner *runner, const struct shader_runner_o
current_sampler->v_address = D3D12_TEXTURE_ADDRESS_MODE_CLAMP;
current_sampler->w_address = D3D12_TEXTURE_ADDRESS_MODE_CLAMP;
}
else if (sscanf(line, "[render target %u]\n", &index))
else if (sscanf(line, "[rtv %u]\n", &index))
{
state = STATE_RESOURCE;
@ -1549,13 +1557,12 @@ void run_shader_tests(struct shader_runner *runner, const struct shader_runner_o
current_resource.slot = index;
current_resource.type = RESOURCE_TYPE_RENDER_TARGET;
current_resource.dimension = RESOURCE_DIMENSION_2D;
current_resource.format = DXGI_FORMAT_R32G32B32A32_FLOAT;
current_resource.data_type = TEXTURE_DATA_FLOAT;
current_resource.texel_size = 16;
current_resource.level_count = 1;
}
else if (sscanf(line, "[texture %u]\n", &index))
else if (sscanf(line, "[srv %u]\n", &index))
{
state = STATE_RESOURCE;
@ -1563,7 +1570,6 @@ void run_shader_tests(struct shader_runner *runner, const struct shader_runner_o
current_resource.slot = index;
current_resource.type = RESOURCE_TYPE_TEXTURE;
current_resource.dimension = RESOURCE_DIMENSION_2D;
current_resource.format = DXGI_FORMAT_R32G32B32A32_FLOAT;
current_resource.data_type = TEXTURE_DATA_FLOAT;
current_resource.texel_size = 16;
@ -1577,41 +1583,12 @@ void run_shader_tests(struct shader_runner *runner, const struct shader_runner_o
current_resource.slot = index;
current_resource.type = RESOURCE_TYPE_UAV;
current_resource.dimension = RESOURCE_DIMENSION_2D;
current_resource.format = DXGI_FORMAT_R32G32B32A32_FLOAT;
current_resource.data_type = TEXTURE_DATA_FLOAT;
current_resource.texel_size = 16;
current_resource.level_count = 1;
}
else if (sscanf(line, "[buffer srv %u]\n", &index))
{
state = STATE_RESOURCE;
memset(&current_resource, 0, sizeof(current_resource));
current_resource.slot = index;
current_resource.type = RESOURCE_TYPE_TEXTURE;
current_resource.dimension = RESOURCE_DIMENSION_BUFFER;
current_resource.format = DXGI_FORMAT_R32G32B32A32_FLOAT;
current_resource.data_type = TEXTURE_DATA_FLOAT;
current_resource.texel_size = 16;
current_resource.level_count = 1;
}
else if (sscanf(line, "[buffer uav %u]\n", &index))
{
state = STATE_RESOURCE;
memset(&current_resource, 0, sizeof(current_resource));
current_resource.slot = index;
current_resource.type = RESOURCE_TYPE_UAV;
current_resource.dimension = RESOURCE_DIMENSION_BUFFER;
current_resource.format = DXGI_FORMAT_R32G32B32A32_FLOAT;
current_resource.data_type = TEXTURE_DATA_FLOAT;
current_resource.texel_size = 16;
current_resource.level_count = 1;
}
else if (sscanf(line, "[vertex buffer %u]\n", &index))
else if (sscanf(line, "[vb %u]\n", &index))
{
state = STATE_RESOURCE;