[Public WebGL] Conformance test for GLSL: Side-effects in the ternary if operator (used in combination with the comma (sequence) operator)

Gregg Tavares (勤) [email protected]
Fri Feb 10 17:29:25 PST 2012

Thanks for this and please keep them coming.

I added these 2 tests to the WebGL conformance tests.



I hope those sufficiently test the issue.  I verified they do fail on ANGLE
for 2 of 9 tests

You can run newer conformance tests here


As soon as 1.0.1 is ratified we'll start pushing on 1.0.2 (though hopefully
we'll find time to fix these bugs asap)


On Fri, Feb 10, 2012 at 11:24 AM, Rehno Lindeque
<[email protected]>wrote:

> Hi all,
> Following a lively discussion at the San Francisco WebGL meetup last
> night, someone suggested that we should submit bugs in GLSL so they could
> be added to the WebGL conformance tests. I agree that getting consistent
> glsl support across all devices/drivers would be pretty helpful.
> This is a bug that I've found in ANGLE on windows machines running Google
> Chrome 16.0.912.77 m.
> float a = ...
> float b = ...
> float r0 = ...
> float r1 = ...
> float r = ...
> float ab = a > b? (r = r0, a) : (r = r1, b);
> return r;
> On my usual (linux) machine this runs only one of the two side-effects (r
> = r0) or (r = r1) as you'd expect, but on ANGLE I believe it probably runs
> both.
> I didn't submit this before because I haven't had time to write up a
> decent test, however if someone would be willing to add it I'd be grateful.
> I guess I could probably be convinced to generate a shader that fails at
> this if you really need it.
> Thank you,
> Rehno
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://khronos.org/pipermail/public_webgl_khronos.org/attachments/20120210/8b1b8e83/attachment.html>

More information about the public_webgl mailing list