[Public WebGL] Conformance test change around active uniforms

Rafael Cintron [email protected]
Wed Mar 18 18:53:12 PDT 2015

In the shader, gl_DepthRange is meant to reflect what you set via the depthRange function.  Are these builtin uniforms able to be returned via getUniformLocation and set via uniformXXX?  If so, what ends up winning, depthRange or uniformXXX?

From: [email protected] [mailto:[email protected]] On Behalf Of Jeff Gilbert
Sent: Wednesday, March 18, 2015 6:28 PM
To: Kenneth Russell
Cc: [email protected]
Subject: Re: [Public WebGL] Conformance test change around active uniforms

I advise that we not fake the inclusion of the third part of gl_DepthRange, since this impacts active uniform packing, even if the driver is apparently not packing them. (as indicated by not exposing the third part in the list of active uniforms)
Active uniforms is not so much 'what am I using', but rather 'what is the driver using'.

On Wed, Mar 18, 2015 at 6:01 PM, Kenneth Russell <[email protected]<mailto:[email protected]>> wrote:

There's been a longstanding issue with the WebGL conformance tests
that were ported from the OpenGL ES 2.0 suite. To ensure consistency
between implementations, the WebGL harness is stricter than the OpenGL
ES one in requiring certain uniforms to be considered active or
inactive in the various test cases.

Jeff Gilbert from Mozilla rediscovered this discrepancy in
https://github.com/KhronosGroup/WebGL/pull/888 and found the root
cause: some implementations were exposing the built-in uniforms
gl_DepthRange.near, gl_DepthRange.far and gl_DepthRange.diff as active
uniforms, and some weren't.

Now that the difference in behavior is well understood, these tests
have been changed in the top of tree conformance suite to require that
these uniforms be reported as active when they are referenced in the
shaders. Please see https://github.com/KhronosGroup/WebGL/pull/902 .

The reason that only some, and not all, of these three built-in
uniforms were required to be present is pragmatic: some drivers seem
to optimize one of them away and compute it from the other two. If
necessary, implementations could be changed to report all of them.

If you have any comments on this change please post them to the list.
The archived WebGL conformance suites have been changed to allow both
the old and new behavior.



You are currently subscribed to [email protected]<mailto:[email protected]>.
To unsubscribe, send an email to [email protected]<mailto:[email protected]> with
the following command in the body of your email:
unsubscribe public_webgl

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://khronos.org/pipermail/public_webgl_khronos.org/attachments/20150319/7ef23776/attachment.html>

More information about the public_webgl mailing list