tests/shader_runner: Introduce a Metal shader runner.

This commit is contained in:
Feifan He
2024-10-21 22:23:27 +08:00
committed by Henri Verbeet
parent da75582a14
commit b0646cb427
Notes: Henri Verbeet 2024-10-31 16:58:27 +01:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1205
176 changed files with 1154 additions and 992 deletions

View File

@@ -17,15 +17,15 @@ float4 main() : sv_target
[test]
if(sm<4) uniform 0 float4 3 0 0 0
if(sm>=4) uniform 0 uint4 3 0 0 0
todo(sm<4) draw quad
todo(sm<4 | msl) draw quad
probe (0, 0) rgba (5.0, 5.0, 5.0, 5.0)
if(sm<4) uniform 0 float4 1 0 0 0
if(sm>=4) uniform 0 uint4 1 0 0 0
todo(sm<4) draw quad
todo(sm<4 | msl) draw quad
probe (0, 0) rgba (4.0, 4.0, 4.0, 4.0)
if(sm<4) uniform 0 float4 0 0 0 0
if(sm>=4) uniform 0 uint4 0 0 0 0
todo(sm<4) draw quad
todo(sm<4 | msl) draw quad
probe (0, 0) rgba (3.0, 3.0, 3.0, 3.0)
@@ -45,15 +45,15 @@ float4 main() : sv_target
[test]
if(sm<4) uniform 0 float4 3 0 0 0
if(sm>=4) uniform 0 uint4 3 0 0 0
todo(sm<4) draw quad
todo(sm<4 | msl) draw quad
probe (0, 0) rgba (5.0, 5.0, 5.0, 5.0)
if(sm<4) uniform 0 float4 1 0 0 0
if(sm>=4) uniform 0 uint4 1 0 0 0
todo(sm<4) draw quad
todo(sm<4 | msl) draw quad
probe (0, 0) rgba (5.0, 5.0, 5.0, 5.0)
if(sm<4) uniform 0 float4 0 0 0 0
if(sm>=4) uniform 0 uint4 0 0 0 0
todo(sm<4) draw quad
todo(sm<4 | msl) draw quad
probe (0, 0) rgba (5.0, 5.0, 5.0, 5.0)
@@ -91,15 +91,15 @@ float4 main() : sv_target
[test]
if(sm<4) uniform 0 float4 2 0 0 0
if(sm>=4) uniform 0 uint4 2 0 0 0
todo(sm<4) draw quad
todo(sm<4 | msl) draw quad
probe (0, 0) rgba (1.0, 2.0, 3.0, 4.0)
if(sm<4) uniform 0 float4 1 0 0 0
if(sm>=4) uniform 0 uint4 1 0 0 0
todo(sm<4) draw quad
todo(sm<4 | msl) draw quad
probe (0, 0) rgba (1.1, 2.0, 3.0, 4.0)
if(sm<4) uniform 0 float4 0 0 0 0
if(sm>=4) uniform 0 uint4 0 0 0 0
todo(sm<4) draw quad
todo(sm<4 | msl) draw quad
probe (0, 0) rgba (1.1, 2.0, 3.0, 4.0)
@@ -127,11 +127,11 @@ float4 main() : sv_target
[test]
if(sm<4) uniform 0 float4 2 0 0 0
if(sm>=4) uniform 0 uint4 2 0 0 0
todo(sm<4) draw quad
todo(sm<4 | msl) draw quad
probe (0, 0) rgba (1.1, 2.1, 3.1, 4.1)
if(sm<4) uniform 0 float4 1 0 0 0
if(sm>=4) uniform 0 uint4 1 0 0 0
todo(sm<4) draw quad
todo(sm<4 | msl) draw quad
probe (0, 0) rgba (1.0, 2.0, 3.0, 4.0)
@@ -159,11 +159,11 @@ float4 main() : sv_target
[test]
if(sm<4) uniform 0 float4 2 0 0 0
if(sm>=4) uniform 0 uint4 2 0 0 0
todo(sm<4) draw quad
todo(sm<4 | msl) draw quad
probe (0, 0) rgba (1.1, 2.1, 3.1, 4.1)
if(sm<4) uniform 0 float4 1 0 0 0
if(sm>=4) uniform 0 uint4 1 0 0 0
todo(sm<4) draw quad
todo(sm<4 | msl) draw quad
probe (0, 0) rgba (1.0, 2.0, 3.0, 4.0)
[pixel shader fail(sm<4 | sm>=6) todo(sm<4)]
@@ -188,10 +188,10 @@ float4 main() : sv_target
[test]
uniform 0 float4 2.0 0.0 0.0 0.0
todo(sm<4) draw quad
todo(sm<4 | msl) draw quad
probe (0, 0) rgba (1.1, 2.1, 3.1, 4.1)
uniform 0 float4 1.0 0.0 0.0 0.0
todo(sm<4) draw quad
todo(sm<4 | msl) draw quad
probe (0, 0) rgba (1.0, 2.0, 3.0, 4.0)
[pixel shader fail]
@@ -390,15 +390,15 @@ float4 main() : sv_target
[test]
if(sm<4) uniform 0 float4 2 0 0 0
if(sm>=4) uniform 0 uint4 2 0 0 0
todo(sm<4) draw quad
todo(sm<4 | msl) draw quad
probe (0, 0) rgba (1.1, 2.1, 3.1, 4.1)
if(sm<4) uniform 0 float4 1 0 0 0
if(sm>=4) uniform 0 uint4 1 0 0 0
todo(sm<4) draw quad
todo(sm<4 | msl) draw quad
probe (0, 0) rgba (1.2, 2.2, 3.2, 4.2)
if(sm<4) uniform 0 float4 0 0 0 0
if(sm>=4) uniform 0 uint4 0 0 0 0
todo(sm<4) draw quad
todo(sm<4 | msl) draw quad
probe (0, 0) rgba (1.0, 2.0, 3.0, 4.0)
% switch breaks within a loop
@@ -431,7 +431,7 @@ float4 main() : sv_target
[test]
if(sm<4) uniform 0 float4 2 0 0 0
if(sm>=4) uniform 0 uint4 2 0 0 0
todo(sm<4) draw quad
todo(sm<4 | msl) draw quad
probe (0, 0) rgba (5.0, 6.0, 7.0, 8.0)
@@ -464,15 +464,15 @@ float4 main() : sv_target
[test]
if(sm<4) uniform 0 float4 0 0 0 0
if(sm>=4) uniform 0 uint4 0 0 0 0
todo(sm<4) draw quad
todo(sm<4 | msl) draw quad
probe (0, 0) rgba (4.0, 5.0, 6.0, 7.0)
if(sm<4) uniform 0 float4 2 0 0 0
if(sm>=4) uniform 0 uint4 2 0 0 0
todo(sm<4) draw quad
todo(sm<4 | msl) draw quad
probe (0, 0) rgba (2.0, 3.0, 4.0, 5.0)
if(sm<4) uniform 0 float4 3 0 0 0
if(sm>=4) uniform 0 uint4 3 0 0 0
todo(sm<4) draw quad
todo(sm<4 | msl) draw quad
probe (0, 0) rgba (4.0, 5.0, 6.0, 7.0)
@@ -505,15 +505,15 @@ float4 main() : sv_target
[test]
if(sm<4) uniform 0 float4 3 0 0 0
if(sm>=4) uniform 0 uint4 3 0 0 0
todo(sm<4) draw quad
todo(sm<4 | msl) draw quad
probe (0, 0) rgba (1.0, 2.0, 3.0, 4.0)
if(sm<4) uniform 0 float4 0 0 0 0
if(sm>=4) uniform 0 uint4 0 0 0 0
todo(sm<4) draw quad
todo(sm<4 | msl) draw quad
probe (0, 0) rgba (4.0, 5.0, 6.0, 7.0)
if(sm<4) uniform 0 float4 5 0 0 0
if(sm>=4) uniform 0 uint4 5 0 0 0
todo(sm<4) draw quad
todo(sm<4 | msl) draw quad
probe (0, 0) rgba (1.0, 2.0, 3.0, 4.0)
% 'continue' is not supported in switches
@@ -574,11 +574,11 @@ float4 main() : sv_target
[test]
if(sm<4) uniform 0 float4 1 0 3 1
if(sm>=4) uniform 0 uint4 1 0 3 1
draw quad
todo(msl) draw quad
probe (0, 0) rgba (10.0, 11.0, 12.0, 13.0)
if(sm<4) uniform 0 float4 0 0 3 1
if(sm>=4) uniform 0 uint4 0 0 3 1
draw quad
todo(msl) draw quad
probe (0, 0) rgba (7.0, 8.0, 9.0, 10.0)
% return from a switch nested in a loop
@@ -610,11 +610,11 @@ float4 main() : sv_target
[test]
if(sm<4) uniform 0 float4 0 0 3 1
if(sm>=4) uniform 0 uint4 0 0 3 1
draw quad
todo(msl) draw quad
probe (0, 0) rgba (304.0, 305.0, 306.0, 307.0)
if(sm<4) uniform 0 float4 1 0 3 1
if(sm>=4) uniform 0 uint4 1 0 3 1
draw quad
todo(msl) draw quad
probe (0, 0) rgba (3.0, 4.0, 5.0, 6.0)
[require]