[Piglit] [PATCH] Remove BindBufferRange out-of-range tests.

Chad Versace chad.versace at linux.intel.com
Fri Feb 8 10:54:14 PST 2013

On 02/07/2013 06:35 PM, Paul Berry wrote:
> In the documentation for BindBufferRange, OpenGL specs from 3.0
> through 4.1 contain this language:
>     "The error INVALID_VALUE is generated if size is less than or
>     equal to zero or if offset + size is greater than the value of
> This text was dropped from OpenGL 4.2, and it does not appear in the
> GLES 3.0 spec.
> Presumably the reason for the change is because come clients change
> the size of the buffer after calling BindBufferRange.  Implementations
> shouldn't generate an error at the time of the BindBufferRange call
> just because the old size of the buffer was too small, when the buffer
> is about to be resized.
> Since this is a deliberate relaxation of error conditions in order to
> allow clients to work, it seems sensible to allow implementations to
> apply this change even if the GL version is less than 4.2.  This patch
> eliminates the checks that would have required the error condition to
> be flagged.
> See associated Mesa patch:
>     mesa: Don't check (offset + size <= bufObj->Size) in BindBufferRange.
> ---
>  .../arb_uniform_buffer_object/negative-bindbufferrange-range.c    | 8 --------
>  1 file changed, 8 deletions(-)

This seems reasonable to me.
Reviewed-by: Chad Versace <chad.versace at linux.intel.com>

More information about the Piglit mailing list