Use the ProgramBinary's serial to track changed D3D9 shaders instead of the Program's

Trac #21270 Bug=351 Signed-off-by: Nicolas Capens This is necessary since the shaders can change every time a new ProgramBinary is created (eg when re-linking or loading a new binary). git-svn-id: https://angleproject.googlecode.com/svn/trunk@1233 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent e87ca000
......@@ -384,7 +384,7 @@ void Context::markAllStateDirty()
mAppliedTextureSerialVS[t] = 0;
}
mAppliedProgramSerial = 0;
mAppliedProgramBinarySerial = 0;
mAppliedRenderTargetSerial = 0;
mAppliedDepthbufferSerial = 0;
mAppliedStencilbufferSerial = 0;
......@@ -2339,7 +2339,7 @@ void Context::applyShaders()
Program *programObject = getCurrentProgram();
ProgramBinary *programBinary = programObject->getProgramBinary();
if (programObject->getSerial() != mAppliedProgramSerial)
if (programBinary->getSerial() != mAppliedProgramBinarySerial)
{
IDirect3DVertexShader9 *vertexShader = programBinary->getVertexShader();
IDirect3DPixelShader9 *pixelShader = programBinary->getPixelShader();
......@@ -2347,7 +2347,7 @@ void Context::applyShaders()
mDevice->SetPixelShader(pixelShader);
mDevice->SetVertexShader(vertexShader);
programBinary->dirtyAllUniforms();
mAppliedProgramSerial = programObject->getSerial();
mAppliedProgramBinarySerial = programBinary->getSerial();
}
programBinary->applyUniforms();
......
......@@ -586,7 +586,7 @@ class Context
unsigned int mAppliedTextureSerialPS[MAX_TEXTURE_IMAGE_UNITS];
unsigned int mAppliedTextureSerialVS[MAX_VERTEX_TEXTURE_IMAGE_UNITS_VTF];
unsigned int mAppliedProgramSerial;
unsigned int mAppliedProgramBinarySerial;
unsigned int mAppliedRenderTargetSerial;
unsigned int mAppliedDepthbufferSerial;
unsigned int mAppliedStencilbufferSerial;
......
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