Show restart index on GL pipe state, and handle it being disabled

This commit is contained in:
baldurk
2015-01-15 23:37:17 +00:00
parent 1096308755
commit f459c63380
7 changed files with 87 additions and 9 deletions
+2
View File
@@ -54,6 +54,8 @@ struct GLPipelineState
rdctype::array<VertexBuffer> vbuffers;
ResourceId ibuffer;
bool32 primitiveRestart;
uint32_t restartIndex;
} m_VtxIn;
struct ShaderStage
+3
View File
@@ -864,6 +864,9 @@ void GLReplay::SavePipelineState()
gl.glGetIntegerv(eGL_ELEMENT_ARRAY_BUFFER_BINDING, (GLint*)&ibuffer);
pipe.m_VtxIn.ibuffer = rm->GetOriginalID(rm->GetID(BufferRes(ctx, ibuffer)));
pipe.m_VtxIn.primitiveRestart = rs.Enabled[GLRenderState::eEnabled_PrimitiveRestart];
pipe.m_VtxIn.restartIndex = rs.Enabled[GLRenderState::eEnabled_PrimitiveRestartFixedIndex] ? ~0U : rs.PrimitiveRestartIndex;
// Vertex buffers and attributes
GLint numVBufferBindings = 16;
gl.glGetIntegerv(eGL_MAX_VERTEX_ATTRIB_BINDINGS, &numVBufferBindings);