| Index: src/gpu/glsl/GrGLSLShaderBuilder.cpp
|
| diff --git a/src/gpu/glsl/GrGLSLShaderBuilder.cpp b/src/gpu/glsl/GrGLSLShaderBuilder.cpp
|
| index 30bf86d2106c98ac3960865d3f6373e601dd2e92..e4753e991b15d42c00f90ef0e7207948bbc21593 100644
|
| --- a/src/gpu/glsl/GrGLSLShaderBuilder.cpp
|
| +++ b/src/gpu/glsl/GrGLSLShaderBuilder.cpp
|
| @@ -59,22 +59,20 @@ void GrGLSLShaderBuilder::emitFunction(GrSLType returnType,
|
| void GrGLSLShaderBuilder::appendTextureLookup(SkString* out,
|
| const GrGLSLTextureSampler& sampler,
|
| const char* coordName,
|
| - GrSLType varyingType) const {
|
| + GrSLType coordType) const {
|
| const GrGLSLCaps* glslCaps = fProgramBuilder->glslCaps();
|
| GrGLSLUniformHandler* uniformHandler = fProgramBuilder->uniformHandler();
|
| GrSLType samplerType = uniformHandler->getUniformVariable(sampler.fSamplerUniform).getType();
|
| if (samplerType == kSampler2DRect_GrSLType) {
|
| - if (varyingType == kVec2f_GrSLType) {
|
| + if (coordType == kVec2f_GrSLType) {
|
| out->appendf("%s(%s, textureSize(%s) * %s)",
|
| - GrGLSLTexture2DFunctionName(varyingType, samplerType,
|
| - glslCaps->generation()),
|
| + GrGLSLTextureFunctionName(coordType, samplerType, glslCaps->generation()),
|
| uniformHandler->getUniformCStr(sampler.fSamplerUniform),
|
| uniformHandler->getUniformCStr(sampler.fSamplerUniform),
|
| coordName);
|
| } else {
|
| out->appendf("%s(%s, vec3(textureSize(%s) * %s.xy, %s.z))",
|
| - GrGLSLTexture2DFunctionName(varyingType, samplerType,
|
| - glslCaps->generation()),
|
| + GrGLSLTextureFunctionName(coordType, samplerType, glslCaps->generation()),
|
| uniformHandler->getUniformCStr(sampler.fSamplerUniform),
|
| uniformHandler->getUniformCStr(sampler.fSamplerUniform),
|
| coordName,
|
| @@ -82,7 +80,7 @@ void GrGLSLShaderBuilder::appendTextureLookup(SkString* out,
|
| }
|
| } else {
|
| out->appendf("%s(%s, %s)",
|
| - GrGLSLTexture2DFunctionName(varyingType, samplerType, glslCaps->generation()),
|
| + GrGLSLTextureFunctionName(coordType, samplerType, glslCaps->generation()),
|
| uniformHandler->getUniformCStr(sampler.fSamplerUniform),
|
| coordName);
|
| }
|
|
|