diff options
author | Eric Anholt <[email protected]> | 2012-06-26 13:17:08 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2012-08-07 13:54:50 -0700 |
commit | 56e82e30cb60368bb3605f95130732f5edbab0a0 (patch) | |
tree | 9bc9c6ea3da679a9aae4000c2031ab8389690993 /doxygen | |
parent | a75f2681d26aecad185895c1c2f13dd542281ff9 (diff) |
mesa: Make glBindBufferBase/glBindBufferRange() work on just-genned names.
In between glGenBuffers() and glBindBuffer(), the buffer object points to this
dummy buffer with a name of 0, and a glBindBufferBase() would point to that.
It seems pretty clear, given that glBindBufferBase() only cares about the
current size of the buffer at render time, that it should bind up the buffer
that you passed in instead of pointing it at this useless dummy buffer.
However, what should glBindBufferRange() do? As of this patch, it will
promote the genned buffer to a proper buffer like it had been
glBindBuffer()ed, and then detect that the size is greater than the buffer's
current size of 0 and throw INVALID_VALUE. It seems like the most reasonable
answer here.
Note that this also changes the behavior of these two on non-glGenBuffers() bo
names. We haven't yet set up the error throwing for glBindBuffers() on gl
3.1+, and my assumption is that these two functions should inherit their
behavior on un-genned names from glBindBuffers().
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'doxygen')
0 files changed, 0 insertions, 0 deletions