void GrGLNvprProgramBuilder::resolveSeparableVaryings(GrGLuint programId) { int count = fSeparableVaryingInfos.count(); for (int i = 0; i < count; ++i) { GrGLint location; GL_CALL_RET(location, GetProgramResourceLocation(programId, GR_GL_FRAGMENT_INPUT, fSeparableVaryingInfos[i].fVariable.c_str())); fSeparableVaryingInfos[i].fLocation = location; } }
void GrGLNormalPathProcessor::resolveSeparableVaryings(GrGLGpu* gpu, GrGLuint programId) { int count = fSeparableVaryingInfos.count(); for (int i = 0; i < count; ++i) { GrGLint location; GR_GL_CALL_RET(gpu->glInterface(), location, GetProgramResourceLocation(programId, GR_GL_FRAGMENT_INPUT, fSeparableVaryingInfos[i].fVariable.c_str())); fSeparableVaryingInfos[i].fLocation = location; } }
void GrGLPathProgramBuilder::resolveProgramResourceLocations(GrGLuint programID) { this->INHERITED::resolveProgramResourceLocations(programID); if (fGpu->glPathRendering()->shouldBindFragmentInputs()) { return; } int count = fSeparableVaryingInfos.count(); for (int i = 0; i < count; ++i) { GrGLint location; GL_CALL_RET(location, GetProgramResourceLocation(programID, GR_GL_FRAGMENT_INPUT, fSeparableVaryingInfos[i].fVariable.c_str())); fSeparableVaryingInfos[i].fLocation = location; } }
void GrGLProgramBuilder::resolveProgramResourceLocations(GrGLuint programID) { fUniformHandler.getUniformLocations(programID, fGpu->glCaps()); // handle NVPR separable varyings if (!fGpu->glCaps().shaderCaps()->pathRenderingSupport() || fGpu->glPathRendering()->shouldBindFragmentInputs()) { return; } int count = fVaryingHandler.fPathProcVaryingInfos.count(); for (int i = 0; i < count; ++i) { GrGLint location; GL_CALL_RET(location, GetProgramResourceLocation( programID, GR_GL_FRAGMENT_INPUT, fVaryingHandler.fPathProcVaryingInfos[i].fVariable.c_str())); fVaryingHandler.fPathProcVaryingInfos[i].fLocation = location; } }