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

Re: [Public WebGL] Need to spec range checking for WebGL ANGLE_instanced_arrays?

On 3/17/2014 3:02 AM, Kenneth Russell wrote:
On Fri, Mar 14, 2014 at 8:39 AM, Olli Etuaho <oetuaho@nvidia.com> wrote:
Sounds good, though I don't think your interpretation of GL_ARB_robust_buffer_access_behavior is entirely waterproof. The extension gives sufficient security guarantees, but the wording is vague enough that implementations can't be trusted to be identical. Jeff Bolz, who was one of the authors of the extension spec, agreed with me on this. At minimum we need to clarify the extension spec if we want to make this core behavior in WebGL. Right now, at least these two interpretations seem possible:

1. If an index is pointing past the storage of one particular bound buffer, set only that attribute to zero.
2. If an index is pointing past the storage of one particular bound buffer, set all attributes to zero.

Also the case where an indexed attribute is partially inside and partially outside a buffer might be problematic.
That's unfortunate. I wish that the issues with the extension spec had
been thought through and raised earlier.

Do you have a feeling whether GL_ARB_robust_buffer_access can be
clarified, and how? What about whether the WebGL conformance tests
could be written with restricted enough cases to allow multiple
implementations of the current GL_ARB_robust_buffer_access to pass it?

I've been reading the ARB_robust_buffer_access_behaviour (ARB_rbab?) spec, and while it defines vertex attribute access well enough -- modulo the issues Olli raised above -- but the rest of the additions always include this language:

"Out-of-bounds reads may return values from within the buffer object or zero. Out-of-bounds writes may modify values within the buffer object or be discarded."

The "or" statements there are problematic for WebGL, are they not? They provide a security benefit, but for any other buffer accesses (e.g. those added in a future WebGL 2/ES3.0/ES3.1), it seems that WebGL implementations will still need to do the validation and emulation of zero-read/no-op-write at which point the value of ARB_rbab for performance reasons goes down significantly.

    - Vlad

----------------------------------------------------------- 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 -----------------------------------------------------------