[Mesa-dev] [PATCH v2 5/6] mesa: Fix corner cases of BindBufferBase with transform feedback.

Eric Anholt eric at anholt.net
Tue Dec 18 23:03:59 PST 2012


Paul Berry <stereotype441 at gmail.com> writes:

> This patch implements the following behaviours, which are mandated by
> the GL 4.3 and GLES3 specs.
>
> 1. Regarding the GL_TRANSFORM_FEEDBACK_BUFFER_SIZE query: "If the
>    ... size was not specified when the buffer object was bound
>    (e.g. if it was bound with BindBufferBase), ... zero is returned."
>    (GL 4.3 section 6.7.1 "Indexed Buffer Object Limits and Binding
>    Queries").
>
> 2. "BindBufferBase binds the entire buffer, even when the size of the
>    buffer is changed after the binding is established. It is
>    equivalent to calling BindBufferRange with offset zero, while size
>    is determined by the size of the bound buffer at the time the
>    binding is used."  (GL 4.3 section 6.1.1 "Binding Buffer Objects to
>    Indexed Targets").  I interpret "at the time the binding is used"
>    to mean "at the time of the call to glBeginTransformFeedback".
>
> 3. "Regardless of the size specified with BindBufferRange, or
>    indirectly with BindBufferBase, the GL will never read or write
>    beyond the end of a bound buffer. In some cases this constraint may
>    result in visibly different behavior when a buffer overflow would
>    otherwise result, such as described for transform feedback
>    operations in section 13.2.2."  (GL 4.3 section 6.1.1 "Binding
>    Buffer Objects to Indexed Targets").

Acked-by: Eric Anholt <eric at anholt.net>

The previous BindBufferBase spec text was ridiculous, and this is much
better and should be an improvement for any user of the API.

(I don't want this series to block on my review, because I don't think
I'll get to it in the next day and others seem to have stepped up)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20121218/814fcf57/attachment.pgp>


More information about the mesa-dev mailing list