diff options
author | Paul Berry <[email protected]> | 2013-02-07 17:54:59 -0800 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2013-02-07 21:16:37 -0800 |
commit | 04f0d6cc2235ba50f7525446004f634e03632eeb (patch) | |
tree | 0c7c17a4250878533663c45c93f4b6070499a878 /src/mesa/main/drawtex.c | |
parent | f29ab4ece5b6a0321f5e4a6fafb7ecacf7214044 (diff) |
mesa: Don't check (offset + size <= bufObj->Size) in BindBufferRange.
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
BUFFER_SIZE."
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. We don't want
to 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 apply it to all versions
of GL, not just GL 4.2 and above.
(Note that there is no danger of this change allowing a client to
access data beyond the end of a buffer. We already have code to
ensure that that doesn't happen in the case where the client shrinks
the buffer after calling BindBufferRange).
Eliminates a spurious error message in the gles3 conformance test
"transform_feedback_offset_size".
Reviewed-by: Eric Anholt <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/main/drawtex.c')
0 files changed, 0 insertions, 0 deletions