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

Re: [Public WebGL] Updated WebGL spec with bounds checking info

On Thu, May 26, 2011 at 11:18 AM, Chris Marrin <cmarrin@apple.com> wrote:
> I've just added two new sections to the WebGL editor's draft:
>        https://www.khronos.org/registry/webgl/specs/latest/#4.5
>        https://www.khronos.org/registry/webgl/specs/latest/#6.20
> Please review for accuracy and clarity...

There are a couple of inaccuracies and grammatical errors in Section
4.5 (Out-of-Range Array Accesses). Here is a suggested rewrite of the
first paragraph:

Shaders must not be allowed to read or write array elements that lie
outside the bounds of the array. This includes any variable of array
type, as well as vector or matrix types such as <code>vec3</code> or
<code>mat4</code> when accessed using array subscripting syntax. If
detected during compilation, such accesses may generate an error and
prevent the shader from compiling. Otherwise, at runtime they may
return a constant value (such as 0), or the value at any valid index
of the same array.

Section 6.20 (Dynamic Indexing of Arrays) is redundant; all of its
restrictions are already covered in Section 4.3 (Supported GLSL
Constructs), since Section 4.3 specifically references the array
indexing limitations in Appendix A of the GLSL ES spec. There are also
some differences in terminology between this section and GLSL ES'
Appendix A. This section should just be removed. I don't think any
additional text is needed in Section 4.3. The links from Section 4.5
to the Dynamic Indexing section can just be retargeted to Section 4.3.

Are there any objections to making the above changes? If not, and if
Chris is too busy, I'll update the spec.


You are currently subscribed to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email:
unsubscribe public_webgl