Commit 93a5ce96 by Geoff Lang

Cache applied primitive topology.

Issue #451 Signed-off-by: Jamie Madill Signed-off-by: Shannon Woods Author: Geoff Lang
parent a6abd891
......@@ -849,7 +849,11 @@ bool Renderer11::applyPrimitiveType(GLenum mode, GLsizei count)
return gl::error(GL_INVALID_ENUM, false);
}
mDeviceContext->IASetPrimitiveTopology(primitiveTopology);
if (primitiveTopology != mCurrentPrimitiveTopology)
{
mDeviceContext->IASetPrimitiveTopology(primitiveTopology);
mCurrentPrimitiveTopology = primitiveTopology;
}
return count > 0;
}
......@@ -1816,6 +1820,8 @@ void Renderer11::markAllStateDirty()
mCurrentVertexConstantBuffer = NULL;
mCurrentPixelConstantBuffer = NULL;
mCurrentGeometryConstantBuffer = NULL;
mCurrentPrimitiveTopology = D3D_PRIMITIVE_TOPOLOGY_UNDEFINED;
}
void Renderer11::releaseDeviceResources()
......
......@@ -288,6 +288,9 @@ class Renderer11 : public Renderer
float mCurNear;
float mCurFar;
// Currently applied primitive topology
D3D11_PRIMITIVE_TOPOLOGY mCurrentPrimitiveTopology;
unsigned int mAppliedIBSerial;
unsigned int mAppliedStorageIBSerial;
unsigned int mAppliedIBOffset;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment