[Public WebGL] WebGL2 element array buffer and copy buffer (5.1 Buffer Object Binding)

Kevin Rogovin ([email protected]) [email protected]
Thu Jul 9 11:09:21 PDT 2020


Hmm... judging by docs/ExtensionSupport.md of ANGLE:

"
GL\_EXT\_robustness
    *   reset notifications and sized queries only, no robust buffer access
"

It looks like if a browser is using ANGLE to do WebGL2, then robust
buffer access is done by software on top, rather than hw.

Any developers for various browsers able to confirm this or say the
above is wrong for their browser?

-Kevin

On Thu, Jul 9, 2020 at 9:00 PM Kevin Rogovin
<[email protected]> wrote:
>
> Hi,
>
>   My use case is that I am thinking of using transform feedback to
> generate an index buffer. When one says "The CopyBufferSubData call
> updates the shadow copies as well, allowing the maximum index per type
> and range within the buffer to be computed without readback.", what I
> do not follow is how the computation of the maximum index value per
> type is computed on GLES3.0 without reading the buffer contents back
> to CPU.
>
> However, I guess the real question for me is this: can one expect that
> the robust access is implemented by GPU (instead of implemented by a
> WebGL implementation bt tracking) for Dx10 backends and those OpenGL
> and GLES backends that are operating on HW with
> GL_ARB/KHR/EXT_robust_access?
>
> -Kevin
>
> On Thu, Jul 9, 2020 at 8:50 PM Ken Russell ([email protected])
> <[email protected]> wrote:
> >
> > WebGL implementations that can't rely on robust buffer access behavior shadow the contents of ELEMENT_ARRAY_BUFFERs on the CPU. The CopyBufferSubData call updates the shadow copies as well, allowing the maximum index per type and range within the buffer to be computed without readback.
> >
> > The restrictions in the WebGL specification are there to avoid the need to shadow the contents of all buffers.
> >
> > -Ken
> >
> >
> >
> > On Thu, Jul 9, 2020 at 10:02 AM Kevin Rogovin ([email protected]) <[email protected]> wrote:
> >>
> >>
> >> Hi,
> >>
> >>  Reading the text, it appears that:
> >>
> >> glGenBuffers(1, &index_buffer);
> >> glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, index_buffer);
> >>
> >> glBindBuffer(GL_COPY_READ_BUFFER, some_other_buffer);
> >> glBindBuffer(GL_COPY_WRITE_BUFFER, index_buffer);
> >> glCopyBufferSubData(GL_COPY_READ_BUFFER, GL_COPY_WRITE_BUFFER,
> >> someOffset, someLength);
> >>
> >> is legal because index_buffer gets the type "element array", from the
> >> first bind and binding it to GL_COPY_WRITE_BUFFER is legal because of
> >> what the table states.
> >>
> >> However, the rational states the restriction is to make sure index
> >> values are in range, but the above scenario in order to make sure that
> >> the indices are in range would require that a browser implementation
> >> would need to peek the buffers via CPU which would defeat the purpose
> >> of using glCopyBufferSubData() on any index buffer.
> >>
> >> What is expected to happen with the above?
> >>
> >> Best Regards,
> >>  -Kevin
> >>
> >> -----------------------------------------------------------
> >> 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
> >> -----------------------------------------------------------
> >>
> >
> >
> > --
> > I support flexible work schedules, and I’m sending this email now because it is within the hours I’m working today.  Please do not feel obliged to reply straight away - I understand that you will reply during the hours you work, which may not match mine.
> >

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





More information about the public_webgl mailing list