[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Public WebGL] Issues with WebGL Conformance 1.0.1b



 

Gregg,

 

I have another issue with a different webgl conformance test.

The limits/gl-min-textures.html test enables 8 active textures and the fragment shader sums up the texel values.  The expectation is that arithmetic on the texel values in the fragment shader should be equivalent to the same arithmetic on the ubyte components from the texture definition.

 

I am seeing 1 bit lsb differences for some particular texture results and would like to request a tolerance allowance (with a ‘,1’ added as the last parameter to the wtu.checkCanvas call).

 

The texel component values go through type and range conversions between definition in glTexImage2D and when they are used in the fragment shader.  At glTexImage2D time the components are typically ubyte, [0..255].  In the fragment shader the texture2D returns a float per component with a  range greater than [0.. 1.0].  When the color fragment is written to the destination surface there’s another type and range conversion back to [0..255] per component.

On lower precision hardware, if the fragment shader is doing arithmetic on the texture values, then the result could fall into a range that ends up with an unexpected 1 bit lsb difference after conversion to the framebuffer format.

 

A simplified description would be something like [0..0xFF] gets converted to the range [0..0x100] and back to [0..0xFF].  The intermediate range has ‘holes’ that lose on the conversion to the final range.

 

Robert Tray

 

 

 

 

From: Robert Tray
Sent: Thursday, October 20, 2011 12:12 PM
To: 'Gregg Tavares (wrk)'
Cc: public_webgl@khronos.org
Subject: RE: [Public WebGL] Issues with WebGL Conformance 1.0.1b

 

 

Thanks Gregg.

 

> this test actually does call bindAttribLocation in the utility function createProgram

 

You’re right.  I missed that.  Now that I think about it, there was an unrelated problem fixed after I debugged that test that would explain what I saw.

Thanks for the quick action.

 

Robert Tray

 

 

 

From: Gregg Tavares (wrk) [mailto:gman@google.com]
Sent: Thursday, October 20, 2011 12:06 PM
To: Robert Tray
Cc: public_webgl@khronos.org
Subject: Re: [Public WebGL] Issues with WebGL Conformance 1.0.1b

 

Thank you for reviewing these

On Thu, Oct 20, 2011 at 10:10 AM, Robert Tray <RTray@nvidia.com> wrote:

 

The current webgl-conformance-tests.html fails a few tests that I’m hoping can be remedied with test changes.

 

1)      Context/context-attributes-alpha-depth-stencil-antialias.html: The test makes assumptions about the location of attributes ‘pos’ and ‘colorIn’.  The test is missing either a bindAttribLocation before the program link or a getAttribLocation after.

 

this test actually does call bindAttribLocation in the utility function createProgram

 

2)      Glsl/functions/glsl-function-mod-gentype.html: The test is enhanced over the GLES2 version of conformance by using two different modulo divisors that are more unique than the ‘1.0’ used in GLES2 conformance.  That’s a good thing.  However the hardware I’m testing on has a 1 bit lsb difference between the built-in and the emulated shader image results.  The 1 bit lsdb delta happens at  the top and bottom extremes for the ‘y’ component.  I would like to request a ‘tolerance:1,’ parameter be used for glsl-function-mod-gentype.html so that it will pass.

done

 

3)      Glsl/functions/glsl-function-normalize.html: The test is enhanced over the GLES2 version of conformance by extending the range of the vector components.  This seems like a good thing too.  But I am seeing a 1 bit lsb difference for a few pixels when comparing the results for the built-in versus emulated shaders.  I would like to request a ‘tolerance:1,’ parameter for the glsl-function-normalize.html test too.

 

done

 

 

Robert Tray