mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
57280673e5
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.
160 lines
3.1 KiB
Plaintext
160 lines
3.1 KiB
Plaintext
[require]
|
|
shader model >= 4.0
|
|
|
|
[input layout]
|
|
0 r32g32b32a32 float texcoord
|
|
|
|
[vertex buffer 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
|
|
|
|
[vertex shader]
|
|
void main(uint id : sv_vertexid, nointerpolation inout float4 t : texcoord, out float4 pos : sv_position)
|
|
{
|
|
float2 coords = float2((id << 1) & 2, id & 2);
|
|
pos = float4(coords * float2(2, -2) + float2(-1, 1), 0, 1);
|
|
}
|
|
|
|
[pixel shader]
|
|
float4 main(nointerpolation float4 t : texcoord) : sv_target
|
|
{
|
|
return t;
|
|
}
|
|
|
|
[test]
|
|
todo(sm>=6) draw triangle list 3
|
|
probe all rgba (0.0, 1.0, 0.0, 1.0)
|
|
|
|
[vertex shader]
|
|
struct ps_input
|
|
{
|
|
nointerpolation float4 t : texcoord;
|
|
};
|
|
|
|
void main(uint id : sv_vertexid, inout ps_input input, out float4 pos : sv_position)
|
|
{
|
|
float2 coords = float2((id << 1) & 2, id & 2);
|
|
pos = float4(coords * float2(2, -2) + float2(-1, 1), 0, 1);
|
|
}
|
|
|
|
[pixel shader]
|
|
struct ps_input
|
|
{
|
|
nointerpolation float4 t : texcoord;
|
|
};
|
|
|
|
float4 main(ps_input input) : sv_target
|
|
{
|
|
return input.t;
|
|
}
|
|
|
|
[test]
|
|
todo(sm>=6) draw triangle list 3
|
|
probe all rgba (0.0, 1.0, 0.0, 1.0)
|
|
|
|
[vertex shader]
|
|
struct ps_input
|
|
{
|
|
nointerpolation float4 t : texcoord;
|
|
};
|
|
|
|
void main(uint id : sv_vertexid, inout ps_input input, out float4 pos : sv_position)
|
|
{
|
|
float2 coords = float2((id << 1) & 2, id & 2);
|
|
pos = float4(coords * float2(2, -2) + float2(-1, 1), 0, 1);
|
|
}
|
|
|
|
[pixel shader]
|
|
struct ps_input
|
|
{
|
|
float4 t : texcoord;
|
|
};
|
|
|
|
float4 main(nointerpolation ps_input input) : sv_target
|
|
{
|
|
return input.t;
|
|
}
|
|
|
|
[test]
|
|
todo(sm>=6) draw triangle list 3
|
|
probe all rgba (0.0, 1.0, 0.0, 1.0)
|
|
|
|
[vertex shader]
|
|
struct ps_input
|
|
{
|
|
nointerpolation float4 t : texcoord;
|
|
};
|
|
|
|
void main(uint id : sv_vertexid, inout ps_input input, out float4 pos : sv_position)
|
|
{
|
|
float2 coords = float2((id << 1) & 2, id & 2);
|
|
pos = float4(coords * float2(2, -2) + float2(-1, 1), 0, 1);
|
|
}
|
|
|
|
[pixel shader]
|
|
struct ps_input
|
|
{
|
|
nointerpolation float4 t : texcoord;
|
|
};
|
|
|
|
float4 main(centroid ps_input input) : sv_target
|
|
{
|
|
return input.t;
|
|
}
|
|
|
|
[test]
|
|
todo(sm>=6) draw triangle list 3
|
|
probe all rgba (0.0, 1.0, 0.0, 1.0)
|
|
|
|
[vertex shader]
|
|
struct ps_input
|
|
{
|
|
nointerpolation float4 t : texcoord;
|
|
};
|
|
|
|
void main(uint id : sv_vertexid, inout ps_input input, out float4 pos : sv_position)
|
|
{
|
|
float2 coords = float2((id << 1) & 2, id & 2);
|
|
pos = float4(coords * float2(2, -2) + float2(-1, 1), 0, 1);
|
|
}
|
|
|
|
[pixel shader]
|
|
struct ps_input
|
|
{
|
|
centroid float4 t : texcoord;
|
|
};
|
|
|
|
float4 main(nointerpolation ps_input input) : sv_target
|
|
{
|
|
return input.t;
|
|
}
|
|
|
|
[test]
|
|
todo(sm>=6) draw triangle list 3
|
|
probe all rgba (0.0, 1.0, 0.0, 1.0)
|
|
|
|
[vertex shader fail todo]
|
|
struct ps_input
|
|
{
|
|
nointerpolation centroid float4 t : texcoord;
|
|
};
|
|
|
|
void main(uint id : sv_vertexid, inout ps_input input, out float4 pos : sv_position)
|
|
{
|
|
float2 coords = float2((id << 1) & 2, id & 2);
|
|
pos = float4(coords * float2(2, -2) + float2(-1, 1), 0, 1);
|
|
}
|
|
|
|
[vertex shader]
|
|
struct ps_input
|
|
{
|
|
nointerpolation float4 t : texcoord;
|
|
};
|
|
|
|
void main(uint id : sv_vertexid, inout centroid ps_input input, out float4 pos : sv_position)
|
|
{
|
|
float2 coords = float2((id << 1) & 2, id & 2);
|
|
pos = float4(coords * float2(2, -2) + float2(-1, 1), 0, 1);
|
|
}
|