[Public WebGL] ANGLE Dynamic Indexing of Arrays of Samplers

Gregg Tavares (wrk) [email protected]
Fri May 27 09:12:12 PDT 2011


On Thu, May 26, 2011 at 11:58 PM, Tim Johansson <[email protected]> wrote:

> On 2011-05-26 19:19, Chris Marrin wrote:
>
>>
>> I'm adding the following statement to the differences section:
>>
>>     The GLSL ES spec<a href="#refsGLES20GLSL">[GLES20GLSL]</a>  allows but
>> does not mandate support for dynamic
>>     indexing of arrays of samplers. WebGL disallows this support.
>>
>> This is in support of tightening the language about array bounds checking.
>> Does ANGLE currently make this check and disallow such indexing?
>>
>>  I would be very surprised if it did as it could not possible pass the
> conformance tests if it did.
>
> The test gl-min-textures.html has a shader which looks like:
>
> "uniform sampler2D uni[8];
> void main()
> {
>    vec4 c = vec4(0,0,0,0);
>    for (int ii = 0; ii < NUM_TEXTURES; ++ii) {
>      c += texture2D(uni[ii], vec2(0.5, 0.5));
>    }
>    gl_FragColor = c;
> }"
>


Is that dynamic indexing? I thought since NUM_TEXTURES is replaced by a
constant it's static. I assumed dynamic meant that the indices can change
depending on the input. For example

uniform sampler2D ab[2];
uniform int aOrB;

void main () {
  gl_FragColor = texture2D(ab[aOrB], vec2(0.5, 0.5));
}

is dynamic indexing since it can not be unrolled.


> That is preventing us from passing the conformance tests on some GLES
> implementations.
>
> There is also an unrolled version of the test which does not use dynamic
> indexing of sampler arrays - gl-min-textures-unroll.html. Do the persons who
> wrote those two tests (svn indicates Gregg and Mo) know if there are any
> known problems with the unrolled version or if we can just switch to using
> that?
>
> //Tim
>
>
>  -----
>> ~Chris
>> [email protected]
>>
>>
>>
>>
>> -----------------------------------------------------------
>> You are currently subscribed to [email protected]
>> To unsubscribe, send an email to [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/20110527/1c131650/attachment.html>


More information about the public_webgl mailing list