mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-01-28 13:05:02 -08:00
tests: Add a test for interpolation modifiers specified on structure fields.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
This commit is contained in:
parent
c5414fa92f
commit
4b8a4809d1
Notes:
Alexandre Julliard
2023-10-09 23:10:36 +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/358
@ -25,3 +25,135 @@ float4 main(nointerpolation float4 t : texcoord) : sv_target
|
||||
[test]
|
||||
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]
|
||||
draw triangle list 3
|
||||
todo 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]
|
||||
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 todo]
|
||||
struct ps_input
|
||||
{
|
||||
nointerpolation float4 t : texcoord;
|
||||
};
|
||||
|
||||
float4 main(centroid ps_input input) : sv_target
|
||||
{
|
||||
return input.t;
|
||||
}
|
||||
|
||||
[test]
|
||||
todo draw triangle list 3
|
||||
todo 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 todo]
|
||||
struct ps_input
|
||||
{
|
||||
centroid float4 t : texcoord;
|
||||
};
|
||||
|
||||
float4 main(nointerpolation ps_input input) : sv_target
|
||||
{
|
||||
return input.t;
|
||||
}
|
||||
|
||||
[test]
|
||||
todo draw triangle list 3
|
||||
todo probe all rgba (0.0, 1.0, 0.0, 1.0)
|
||||
|
||||
[vertex shader fail]
|
||||
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 todo]
|
||||
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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user