Merge "GLES2 translator: fix glUseProgram error"

This commit is contained in:
David Turner
2011-07-11 15:43:40 -07:00
committed by Android Code Review

View File

@@ -1235,6 +1235,7 @@ GL_APICALL void GL_APIENTRY glUseProgram(GLuint program){
GET_CTX(); GET_CTX();
if(thrd->shareGroup.Ptr()) { if(thrd->shareGroup.Ptr()) {
const GLuint globalProgramName = thrd->shareGroup->getGlobalName(SHADER,program); const GLuint globalProgramName = thrd->shareGroup->getGlobalName(SHADER,program);
SET_ERROR_IF(program!=0 && globalProgramName==0,GL_INVALID_VALUE);
ctx->dispatcher().glUseProgram(globalProgramName); ctx->dispatcher().glUseProgram(globalProgramName);
} }
} }