<div dir="ltr">On 7 February 2013 17:54, Paul Berry <span dir="ltr"><<a href="mailto:stereotype441@gmail.com" target="_blank">stereotype441@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">In the documentation for BindBufferRange, OpenGL specs from 3.0<br>
through 4.1 contain this language:<br>
<br>
    "The error INVALID_VALUE is generated if size is less than or<br>
    equal to zero or if offset + size is greater than the value of<br>
    BUFFER_SIZE."<br>
<br>
This text was dropped from OpenGL 4.2, and it does not appear in the<br>
GLES 3.0 spec.<br>
<br>
Presumably the reason for the change is because come clients change<br>
the size of the buffer after calling BindBufferRange.  We don't want<br>
to generate an error at the time of the BindBufferRange call just<br>
because the old size of the buffer was too small, when the buffer is<br>
about to be resized.<br>
<br>
Since this is a deliberate relaxation of error conditions in order to<br>
allow clients to work, it seems sensible to apply it to all versions<br>
of GL, not just GL 4.2 and above.<br>
<br>
(Note that there is no danger of this change allowing a client to<br>
access data beyond the end of a buffer.  We already have code to<br>
ensure that that doesn't happen in the case where the client shrinks<br>
the buffer after calling BindBufferRange).<br>
<br>
Eliminates a spurious error message in the gles3 conformance test<br>
"transform_feedback_offset_size".<br></blockquote><div><br></div><div>Oops, I forgot to say:<br><br>Note: this is a candidate for the 9.1 branch.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

---<br>
 src/mesa/main/bufferobj.c | 7 -------<br>
 1 file changed, 7 deletions(-)<br>
<br>
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c<br>
index 7c06938..b82ba7b 100644<br>
--- a/src/mesa/main/bufferobj.c<br>
+++ b/src/mesa/main/bufferobj.c<br>
@@ -2152,13 +2152,6 @@ _mesa_BindBufferRange(GLenum target, GLuint index,<br>
                      (int) size);<br>
          return;<br>
       }<br>
-<br>
-      if (offset + size > bufObj->Size) {<br>
-         _mesa_error(ctx, GL_INVALID_VALUE,<br>
-                     "glBindBufferRange(offset + size %d > buffer size %d)",<br>
-                     (int) (offset + size), (int) (bufObj->Size));<br>
-         return;<br>
-      }<br>
    }<br>
<br>
    switch (target) {<br>
<span class=""><font color="#888888">--<br>
1.8.1.2<br>
<br>
</font></span></blockquote></div><br></div></div>