Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Unified Diff: src/gpu/glsl/GrGLSLShaderBuilder.cpp

Issue 1785873003: Implement GL support for buffer textures (Closed) Base URL: https://skia.googlesource.com/skia.git@upload_glTexBuffer
Patch Set: rebase Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/glsl/GrGLSLShaderBuilder.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « src/gpu/glsl/GrGLSLShaderBuilder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698