mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
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:
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
@@ -84,7 +84,7 @@ float4 main(in apple a) : sv_target
|
||||
|
||||
[test]
|
||||
draw quad
|
||||
probe (0, 0) rgba (10.0, 20.0, 30.0, 40.0)
|
||||
todo(sm>=6) probe (0, 0) rgba (10.0, 20.0, 30.0, 40.0)
|
||||
|
||||
|
||||
% Arrays of matrices get successive indexes.
|
||||
@@ -101,7 +101,7 @@ float4 main(in apple a) : sv_target
|
||||
|
||||
[test]
|
||||
draw quad
|
||||
probe (0, 0) rgba (10.0, 11.0, 30.0, 31.0)
|
||||
todo(sm>=6) probe (0, 0) rgba (10.0, 11.0, 30.0, 31.0)
|
||||
|
||||
|
||||
% Arrays (even multi-dimensional) of struct elements are allowed. The fields in the different struct
|
||||
@@ -120,7 +120,7 @@ float4 main(in apple aps[2][2]) : sv_target
|
||||
|
||||
[test]
|
||||
draw quad
|
||||
probe (0, 0) rgba (10.0, 10.0, 20.0, 20.0)
|
||||
todo(sm>=6) probe (0, 0) rgba (10.0, 10.0, 20.0, 20.0)
|
||||
|
||||
|
||||
[pixel shader]
|
||||
@@ -142,7 +142,7 @@ float4 main(in banana bans[2]) : sv_target
|
||||
|
||||
[test]
|
||||
draw quad
|
||||
probe (0, 0) rgba (10.0, 11.0, 20.0, 21.0)
|
||||
todo(sm>=6) probe (0, 0) rgba (10.0, 11.0, 20.0, 21.0)
|
||||
|
||||
|
||||
[pixel shader fail]
|
||||
@@ -201,11 +201,11 @@ float4 main(in float4 tex0 : TEXCOORD0, in float4 tex1 : TEXCOORD1) : sv_target
|
||||
|
||||
[test]
|
||||
draw quad
|
||||
probe (0, 0) rgba (1.0, 2.0, 10.0, 20.0)
|
||||
todo(sm>=6) probe (0, 0) rgba (1.0, 2.0, 10.0, 20.0)
|
||||
|
||||
|
||||
% Output semantics cannot be mapped to more than one value.
|
||||
[vertex shader fail]
|
||||
[vertex shader fail(sm<6)]
|
||||
struct apple
|
||||
{
|
||||
float2 tex : TEXCOORD0;
|
||||
@@ -251,7 +251,7 @@ void main(out float4 tex[4] : texcoord, inout float4 pos : sv_position)
|
||||
|
||||
|
||||
% Arguments with the same semantic aren't aliased.
|
||||
[pixel shader]
|
||||
[pixel shader fail(sm>=6)]
|
||||
float4 main(in float4 t1 : TEXCOORD0, in float4 t2 : TEXCOORD0) : sv_target
|
||||
{
|
||||
t1 = 99;
|
||||
@@ -259,7 +259,7 @@ float4 main(in float4 t1 : TEXCOORD0, in float4 t2 : TEXCOORD0) : sv_target
|
||||
}
|
||||
|
||||
[test]
|
||||
draw quad
|
||||
todo(sm>=6) draw quad
|
||||
probe (0, 0) rgba (99.0, 99.0, 10.0, 11.0)
|
||||
|
||||
|
||||
@@ -272,19 +272,19 @@ float4 main(in float4 a : TEXCOORD0, in float3 b : TEXCOORD1) : sv_target
|
||||
|
||||
[test]
|
||||
draw quad
|
||||
probe (0, 0) rgba (10.0, 11.0, 20.0, 21.0)
|
||||
todo(sm>=6) probe (0, 0) rgba (10.0, 11.0, 20.0, 21.0)
|
||||
|
||||
|
||||
% In SM4, duplicated input semantics can only have different types if they have the same layout and
|
||||
% register types. SM1 is permissive in this regard.
|
||||
[pixel shader]
|
||||
[pixel shader fail(sm>=6)]
|
||||
float4 main(in float2 a : TEXCOORD0, in half2 b : TEXCOORD0, in float2x1 c: TEXCOORD0) : sv_target
|
||||
{
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
|
||||
[pixel shader]
|
||||
[pixel shader fail(sm>=6)]
|
||||
float4 main(in uint2 a : TEXCOORD0, in int2 b : TEXCOORD0, in int2x1 c : TEXCOORD0, in bool2 d : TEXCOORD0) : sv_target
|
||||
{
|
||||
return 0.0;
|
||||
|
Reference in New Issue
Block a user