tests: Check that -0.0f is not less than 0.0f.

This commit is contained in:
Francisco Casas 2024-02-29 21:18:38 -03:00 committed by Alexandre Julliard
parent 308c7941d4
commit 2b06bcc615
Notes: Alexandre Julliard 2024-03-11 23:06:28 +01:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Zebediah Figura (@zfigura)
Approved-by: Francisco Casas (@fcasas)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/694
2 changed files with 33 additions and 0 deletions

View File

@ -1,3 +1,18 @@
% Check that -0.0f is not less than 0.0f
[pixel shader todo(sm<4)]
float a;
float4 main() : sv_target
{
return -0.0f < a;
}
[test]
uniform 0 float 0.0
todo(sm<4) draw quad
probe all rgba (0.0, 0.0, 0.0, 0.0)
[pixel shader todo(sm<4)] [pixel shader todo(sm<4)]
uniform float4 f; uniform float4 f;

View File

@ -14,6 +14,24 @@ float4 main(in float4 res : COLOR1) : sv_target
} }
% Check that -0.0f is not less than 0.0f
[vertex shader todo(sm<4)]
float a;
void main(out float4 res : COLOR1, in float4 pos : position, out float4 out_pos : sv_position)
{
out_pos = pos;
res = -0.0f < a;
}
[test]
if(sm<4) uniform 0 float 0.0
if(sm>=4) uniform 0 float4 0.0 0.0 0.0 0.0
todo(sm<4) draw quad
probe all rgba (0.0, 0.0, 0.0, 0.0)
[vertex shader todo(sm<4)] [vertex shader todo(sm<4)]
int a, b; int a, b;