Skip to content
Snippets Groups Projects
Commit a18ace73 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard
Browse files

tests: Add a test for side effects of ternary operator.

parent 44bf5556
No related branches found
No related tags found
1 merge request!277tests: Add a test for side effects of ternary operator.
Pipeline #12647 skipped
......@@ -31,3 +31,18 @@ float4 main() : sv_target
uniform 0 float4 1.1 3.0 4.0 5.0
draw quad
probe all rgba (1.1, 2.0, 0.0, 0.0)
[pixel shader]
float4 f;
float4 main() : sv_target
{
float f1 = 0.1, f2 = 0.2, f3;
f3 = f.x ? (f1 = 0.5) + 0.2 : (f2 = 0.6);
return float4(f1, f2, f3, 0.0);
}
[test]
uniform 0 float4 1.0 0.0 0.0 0.0
draw quad
probe all rgba (0.5, 0.6, 0.7, 0.0)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment