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

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

Issue 2143143002: Add Texture2D and Sampler GrSLTypes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: nits Created 4 years, 5 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/GrGLSLSampler.h ('k') | src/gpu/glsl/GrGLSLUniformHandler.h » ('j') | 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 1342d1ce9801f50afc615a2a3b6b535091c425f7..1e52a11013942636fb75495db4b1b8ebc4ff2527 100644
--- a/src/gpu/glsl/GrGLSLShaderBuilder.cpp
+++ b/src/gpu/glsl/GrGLSLShaderBuilder.cpp
@@ -69,7 +69,7 @@ void GrGLSLShaderBuilder::appendTextureLookup(SkString* out,
const GrGLSLCaps* glslCaps = fProgramBuilder->glslCaps();
const GrGLSLSampler& sampler = fProgramBuilder->getSampler(samplerHandle);
GrSLType samplerType = sampler.type();
- if (samplerType == kSampler2DRect_GrSLType) {
+ if (samplerType == kTexture2DRectSampler_GrSLType) {
if (varyingType == kVec2f_GrSLType) {
out->appendf("%s(%s, textureSize(%s) * %s)",
GrGLSLTexture2DFunctionName(varyingType, samplerType,
@@ -116,7 +116,7 @@ void GrGLSLShaderBuilder::appendTexelFetch(SkString* out,
const char* coordExpr) const {
const GrGLSLSampler& sampler = fProgramBuilder->getSampler(samplerHandle);
SkASSERT(fProgramBuilder->glslCaps()->texelFetchSupport());
- SkASSERT(GrSLTypeIsSamplerType(sampler.type()));
+ SkASSERT(GrSLTypeIsCombinedSamplerType(sampler.type()));
out->appendf("texelFetch(%s, %s)", sampler.getSamplerNameForTexelFetch(), coordExpr);
« no previous file with comments | « src/gpu/glsl/GrGLSLSampler.h ('k') | src/gpu/glsl/GrGLSLUniformHandler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698