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
diff --git a/src/libGLESv2/Context.cpp b/src/libGLESv2/Context.cpp
index aa91246..92ebbe4 100644
--- a/src/libGLESv2/Context.cpp
+++ b/src/libGLESv2/Context.cpp
@@ -384,7 +384,7 @@
         mAppliedTextureSerialVS[t] = 0;
     }
 
-    mAppliedProgramSerial = 0;
+    mAppliedProgramBinarySerial = 0;
     mAppliedRenderTargetSerial = 0;
     mAppliedDepthbufferSerial = 0;
     mAppliedStencilbufferSerial = 0;
@@ -2339,7 +2339,7 @@
     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 @@
         mDevice->SetPixelShader(pixelShader);
         mDevice->SetVertexShader(vertexShader);
         programBinary->dirtyAllUniforms();
-        mAppliedProgramSerial = programObject->getSerial();
+        mAppliedProgramBinarySerial = programBinary->getSerial();
     }
 
     programBinary->applyUniforms();