mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 10:00:40 +00:00
If queried buffer size&offset are 0, don't bind with range. Closes #1461
This commit is contained in:
@@ -1094,8 +1094,13 @@ void GLPushPopState::Pop(bool modern)
|
||||
if(modern)
|
||||
{
|
||||
for(size_t i = 0; i < ARRAY_COUNT(idxubo); i++)
|
||||
GL.glBindBufferRange(eGL_UNIFORM_BUFFER, (GLuint)i, idxubo[i].buf, (GLintptr)idxubo[i].offs,
|
||||
(GLsizeiptr)idxubo[i].size);
|
||||
{
|
||||
if(idxubo[i].offs == 0 && idxubo[i].size == 0)
|
||||
GL.glBindBufferBase(eGL_UNIFORM_BUFFER, (GLuint)i, idxubo[i].buf);
|
||||
else
|
||||
GL.glBindBufferRange(eGL_UNIFORM_BUFFER, (GLuint)i, idxubo[i].buf, (GLintptr)idxubo[i].offs,
|
||||
(GLsizeiptr)idxubo[i].size);
|
||||
}
|
||||
|
||||
GL.glBindBuffer(eGL_UNIFORM_BUFFER, ubo);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user