Move dirty DX constant tracking from Context to the Renderers.
TRAC #22308
Signed-off-by: Geoff Lang
Signed-off-by: Daniel Koch
Author: Nicolas Capens
git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1713 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/libGLESv2/Context.cpp b/src/libGLESv2/Context.cpp
index ad4a140..a51a14c 100644
--- a/src/libGLESv2/Context.cpp
+++ b/src/libGLESv2/Context.cpp
@@ -178,8 +178,6 @@
mSupportsEventQueries = false;
mSupportsOcclusionQueries = false;
mNumCompressedTextureFormats = 0;
-
- markAllStateDirty();
}
Context::~Context()
@@ -314,19 +312,6 @@
Framebuffer *framebufferZero = new DefaultFramebuffer(mRenderer, colorbufferZero, depthStencilbufferZero);
setFramebufferZero(framebufferZero);
-
- markAllStateDirty();
-}
-
-// This function will set all of the state-related dirty flags, so that all state is set during next pre-draw.
-void Context::markAllStateDirty()
-{
- mDxUniformsDirty = true;
-}
-
-void Context::markDxUniformsDirty()
-{
- mDxUniformsDirty = true;
}
// NOTE: this function should not assume that this context is current!
@@ -933,7 +918,6 @@
Program *newProgram = mResourceManager->getProgram(program);
Program *oldProgram = mResourceManager->getProgram(priorProgram);
mCurrentProgramBinary.set(NULL);
- mDxUniformsDirty = true;
if (newProgram)
{
@@ -959,7 +943,6 @@
if (linked && program == mState.currentProgram)
{
mCurrentProgramBinary.set(programObject->getProgramBinary());
- mDxUniformsDirty = true;
}
}
@@ -974,7 +957,6 @@
if (loaded && program == mState.currentProgram)
{
mCurrentProgramBinary.set(programObject->getProgramBinary());
- mDxUniformsDirty = true;
}
}
@@ -1719,11 +1701,10 @@
ProgramBinary *programBinary = mState.currentProgram ? getCurrentProgramBinary() : NULL;
if (!mRenderer->setViewport(mState.viewport, mState.zNear, mState.zFar, drawMode, mState.rasterizer.frontFace,
- ignoreViewport, programBinary, mDxUniformsDirty))
+ ignoreViewport, programBinary))
{
return false;
}
- mDxUniformsDirty = false;
mRenderer->setScissorRectangle(mState.scissor, mState.scissorTest);