Install new program binary when current program is successfully relinked or reloaded

Trac #21270 Bug=351 Signed-off-by: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@1240 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 4c962bf1
......@@ -1167,14 +1167,31 @@ void Context::linkProgram(GLuint program)
{
Program *programObject = mResourceManager->getProgram(program);
programObject->link();
bool linked = programObject->link();
// if the current program was relinked successfully we
// need to install the new executables
if (linked && program == mState.currentProgram)
{
mCurrentProgramBinary = programObject->getProgramBinary();
mDxUniformsDirty = true;
}
}
void Context::setProgramBinary(GLuint program, const void *binary, GLint length)
{
Program *programObject = mResourceManager->getProgram(program);
programObject->setProgramBinary(binary, length);
bool loaded = programObject->setProgramBinary(binary, length);
// if the current program was reloaded successfully we
// need to install the new executables
if (loaded && program == mState.currentProgram)
{
mCurrentProgramBinary = programObject->getProgramBinary();
mDxUniformsDirty = true;
}
}
void Context::beginQuery(GLenum target, GLuint query)
......
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