tests/shader-runner: Test shaders with dxcompiler.

The location of dxcompiler should be set during configuration with
'DXCOMPILER_LIBS=-L/path/to/dxcompiler', and then at runtime with
LD_LIBRARY_PATH, WINEPATH or PATH as applicable.

A new 'fail(sm<6)' decoration is needed on many shader declarations
because dxcompiler succeeds on many shaders which fail with fxc. The
opposite case is less common and is flagged with 'fail(sm>=6)'. A few
tests cause dxcompiler to crash or hang, so these are avoided using
[require], which now skips tests until reset instead of exiting. Also,
'todo(sm<6)' and 'todo(sm>=6)' are used to separate checking of results.
This commit is contained in:
Conor McCarthy
2023-09-14 19:29:24 +10:00
committed by Alexandre Julliard
parent d211160b89
commit 57280673e5
Notes: Alexandre Julliard 2023-10-11 22:53:48 +02: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/346
133 changed files with 1284 additions and 572 deletions

View File

@@ -1,7 +1,7 @@
[require]
shader model >= 5.0
[pixel shader fail]
[pixel shader fail(sm<6)]
RWTexture2D<float4> u;
float4 main() : sv_target
@@ -49,7 +49,7 @@ float4 main() : sv_target
}
[test]
draw quad
todo(sm>=6) draw quad
probe uav 1 (0, 0) r (0.5)
probe uav 1 (0, 1) r (0.6)
probe uav 1 (1, 0) r (0.2)
@@ -71,7 +71,7 @@ size (1, 1)
0.1 0.2 0.3 0.4
[pixel shader fail]
[pixel shader fail(sm<6)]
RWTexture2D<float4> u : register(u0);
float4 main() : sv_target1
@@ -80,7 +80,7 @@ float4 main() : sv_target1
return 0;
}
[pixel shader fail]
[pixel shader fail(sm<6)]
RWTexture2D<float4> u : register(u1);
float4 main() : sv_target1
@@ -99,7 +99,7 @@ float4 main() : sv_target1
}
[test]
draw quad
todo(sm>=6) draw quad
probe uav 2 (0, 0) rgba (0.9, 0.8, 0.7, 0.6)
@@ -118,7 +118,7 @@ float4 main() : sv_target1
}
[test]
draw quad
todo(sm>=6) draw quad
probe uav 3 (0, 0) rgba (0.9, 0.8, 0.7, 0.6)
% Uppercase register set name
@@ -132,7 +132,7 @@ float4 main() : sv_target1
}
[test]
draw quad
todo(sm>=6) draw quad
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.
@@ -158,12 +158,12 @@ float4 main() : sv_target1
}
[test]
draw quad
todo(sm>=6) draw quad
probe uav 2 (0, 0) rgba (1.1, 1.2, 1.3, 1.4)
probe uav 3 (0, 0) rgba (2.1, 2.2, 2.3, 2.4)
% RWTexture1D types
[pixel shader]
[pixel shader fail(sm>=6)]
struct s
{
float3 a;
@@ -181,7 +181,7 @@ float4 main() : sv_target1
}
% RWTexture2D types
[pixel shader]
[pixel shader fail(sm>=6)]
struct s
{
float3 a;
@@ -199,7 +199,7 @@ float4 main() : sv_target1
}
% RWTexture3D types
[pixel shader]
[pixel shader fail(sm>=6)]
struct s
{
float3 a;