mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
tests: Try to avoid using SV_Position from shaders which can be tested with SM1.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
committed by
Alexandre Julliard
parent
d2872fa33a
commit
90b4cbc1f2
@@ -1,14 +1,20 @@
|
||||
[vertex shader]
|
||||
void main(out float tex : texcoord, inout float4 pos : sv_position)
|
||||
{
|
||||
tex = pos.x;
|
||||
}
|
||||
|
||||
[pixel shader]
|
||||
float4 main(float4 pos : SV_POSITION) : SV_TARGET
|
||||
float4 main(float tex : texcoord) : sv_target
|
||||
{
|
||||
int i;
|
||||
float x = 0.0;
|
||||
for (i = 0; i < 10; i++)
|
||||
{
|
||||
x += i;
|
||||
if (pos.x == 1.5 && i == 5)
|
||||
if (tex > 0.5 && i == 5)
|
||||
break;
|
||||
if (pos.x == 2.5 && i >= 7)
|
||||
if (tex > -0.5 && i >= 7)
|
||||
continue;
|
||||
x -= 1;
|
||||
}
|
||||
@@ -17,6 +23,6 @@ float4 main(float4 pos : SV_POSITION) : SV_TARGET
|
||||
|
||||
[test]
|
||||
draw quad
|
||||
probe rgba (0, 0) (10.0, 35.0, 0.0, 0.0)
|
||||
probe rgba (1, 0) (5.0, 10.0, 0.0, 0.0)
|
||||
probe rgba (2, 0) (10.0, 38.0, 0.0, 0.0)
|
||||
probe rect rgba ( 0, 0, 159, 480) (10.0, 35.0, 0.0, 0.0)
|
||||
probe rect rgba (161, 0, 479, 480) (10.0, 38.0, 0.0, 0.0)
|
||||
probe rect rgba (481, 0, 640, 480) ( 5.0, 10.0, 0.0, 0.0)
|
||||
|
||||
Reference in New Issue
Block a user