tests: Use the vulkan runner to run SM1 compilation tests.

At the current moment this is a little odd because for SM1 [test]
directives are skipped, and the [shader] directives are not executed by
the shader_runner_vulkan.c:compile_shader() but by the general
shader_runner.c:compile_shader(). So in principle it is a little weird
that we go through the vulkan runner.

But fret not, because in the future we plan to make the parser agnostic
to the language of the tests, so we will get rid of the general
shader_runner.c:compile_shader() function and instead call a
runner->compile_shader() function, defined for each runner. Granted,
most of these may call a generic implementation that uses native
compiler in Windows, and vkd3d-shader on Linux, but it would be more
conceptually correct.
This commit is contained in:
Francisco Casas
2023-11-15 17:41:33 -03:00
committed by Alexandre Julliard
parent b92f6c448a
commit 1c73513425
Notes: Alexandre Julliard 2024-01-24 22:53:52 +01:00
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/514
47 changed files with 313 additions and 307 deletions

View File

@ -32,8 +32,7 @@ float4 main() : sv_target
draw quad
probe all rgba (0.2, 0.1, 0.8, 0.5);
[pixel shader]
[pixel shader todo(sm<4)]
uniform float f;
float func(out float o)
@ -80,20 +79,19 @@ float4 main() : sv_target
[test]
uniform 0 float 0.1
todo(sm>=6) draw quad
todo(sm<4 | sm>=6) draw quad
probe all rgba (0.3, 0.2, 0.6, 0.3) 1
uniform 0 float 0.4
todo(sm>=6) draw quad
todo(sm<4 | sm>=6) draw quad
probe all rgba (0.6, 0.5, 0.6, 0.3) 1
uniform 0 float 0.6
todo(sm>=6) draw quad
todo(sm<4 | sm>=6) draw quad
probe all rgba (0.6, 0.5, 0.4, 0.5) 1
uniform 0 float 0.8
todo(sm>=6) draw quad
todo(sm<4 | sm>=6) draw quad
probe all rgba (0.8, 0.7, 0.4, 0.5) 1
[pixel shader]
[pixel shader todo(sm<4)]
uniform float f;
float func(out float o)
@ -136,17 +134,16 @@ float4 main() : sv_target
[test]
uniform 0 float 0.1
todo(sm>=6) draw quad
todo(sm<4 | sm>=6) draw quad
probe all rgba (0.2, 0.1, 0.2, 0.1) 1
uniform 0 float 0.5
todo(sm>=6) draw quad
todo(sm<4 | sm>=6) draw quad
probe all rgba (0.5, 0.4, 1.0, 0.9) 1
uniform 0 float 0.9
todo(sm>=6) draw quad
todo(sm<4 | sm>=6) draw quad
probe all rgba (1.0, 0.9, 1.0, 0.6) 1
[pixel shader]
[pixel shader todo(sm<4)]
float func(out float o)
{
o = 0.1;
@ -184,11 +181,10 @@ float4 main() : sv_target
}
[test]
draw quad
todo(sm<4) draw quad
probe all rgba (0.4, 0.3, 0.3, 0.9) 1
[pixel shader]
[pixel shader todo(sm<4)]
uniform float f;
float func(out float o)
@ -239,26 +235,26 @@ float4 main() : sv_target
[test]
uniform 0 float 0.0
todo(sm>=6) draw quad
todo(sm<4 | sm>=6) draw quad
probe all rgba (0.3, 0.2, 0.3, 0.3) 1
uniform 0 float 0.1
todo(sm>=6) draw quad
todo(sm<4 | sm>=6) draw quad
probe all rgba (0.3, 0.3, 0.3, 0.3) 1
uniform 0 float 0.3
todo(sm>=6) draw quad
todo(sm<4 | sm>=6) draw quad
probe all rgba (0.3, 0.5, 0.3, 0.3) 1
uniform 0 float 0.7
todo(sm>=6) draw quad
todo(sm<4 | sm>=6) draw quad
probe all rgba (0.3, 0.9, 0.7, 0.6) 1
uniform 0 float 0.9
todo(sm>=6) draw quad
todo(sm<4 | sm>=6) draw quad
probe all rgba (0.4, 0.1, 0.7, 0.6) 1
[pixel shader]
[pixel shader todo(sm<4)]
uniform float4 f[3];
@ -295,21 +291,21 @@ float4 main() : sv_target
uniform 0 float4 0.3 0.0 0.0 0.0
uniform 4 float4 0.0 0.0 0.0 0.0
uniform 8 float4 0.1 0.0 0.0 0.0
todo(sm>=6) draw quad
todo(sm<4 | sm>=6) draw quad
todo(sm>=6) probe all rgba (0.3, 0.2, 0.6, 0.6) 1
uniform 4 float4 0.35 0.0 0.0 0.0
todo(sm>=6) draw quad
todo(sm<4 | sm>=6) draw quad
todo(sm>=6) probe all rgba (0.3, 0.3, 0.6, 0.6) 1
uniform 8 float4 0.5 0.0 0.0 0.0
todo(sm>=6) draw quad
todo(sm<4 | sm>=6) draw quad
todo(sm>=6) probe all rgba (0.3, 0.5, 0.6, 0.6) 1
uniform 0 float4 1.0 0.0 0.0 0.0
todo(sm>=6) draw quad
todo(sm<4 | sm>=6) draw quad
todo(sm>=6) probe all rgba (0.3, 0.5, 0.6, 0.6) 1
uniform 4 float4 2.0 0.0 0.0 0.0
todo(sm>=6) draw quad
todo(sm<4 | sm>=6) draw quad
todo(sm>=6) probe all rgba (0.4, 0.1, 0.6, 0.6) 1