mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-25 15:16:22 +00:00
Don't initialise VAO if attribs have invalid parameters
* Technically we need to try and restore the VAOs even if disabled to the correct setup, so that if they're just enabled they are in the expected state. However if the attribs are in an invalid state it's not legal to just enable them again, so they need to be respecified anyway. * This might have something to do with compatibility profiles - it was seen capturing Wolfenstein: The New Order, which runs 3.2 compatibility.
This commit is contained in:
@@ -1387,10 +1387,13 @@ void GLResourceManager::Apply_InitialState(GLResource live, InitialContentData i
|
||||
|
||||
gl.glVertexAttribBinding(i, attrib.vbslot);
|
||||
|
||||
if(initialdata->VertexAttribs[i].integer == 0)
|
||||
gl.glVertexAttribFormat(i, attrib.size, attrib.type, (GLboolean)attrib.normalized, attrib.offset);
|
||||
else
|
||||
gl.glVertexAttribIFormat(i, attrib.size, attrib.type, attrib.offset);
|
||||
if(attrib.size != 0)
|
||||
{
|
||||
if(initialdata->VertexAttribs[i].integer == 0)
|
||||
gl.glVertexAttribFormat(i, attrib.size, attrib.type, (GLboolean)attrib.normalized, attrib.offset);
|
||||
else
|
||||
gl.glVertexAttribIFormat(i, attrib.size, attrib.type, attrib.offset);
|
||||
}
|
||||
|
||||
VertexBufferInitialData &buf = initialdata->VertexBuffers[i];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user