aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/glsl/GrGLSLShaderBuilder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/glsl/GrGLSLShaderBuilder.cpp')
-rw-r--r--src/gpu/glsl/GrGLSLShaderBuilder.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/gpu/glsl/GrGLSLShaderBuilder.cpp b/src/gpu/glsl/GrGLSLShaderBuilder.cpp
index 2c7e5e476d..de7b326917 100644
--- a/src/gpu/glsl/GrGLSLShaderBuilder.cpp
+++ b/src/gpu/glsl/GrGLSLShaderBuilder.cpp
@@ -143,19 +143,17 @@ void GrGLSLShaderBuilder::appendColorGamutXform(const char* srcColor,
}
void GrGLSLShaderBuilder::appendTexelFetch(SkString* out,
- SamplerHandle samplerHandle,
+ TexelBufferHandle texelBufferHandle,
const char* coordExpr) const {
- const GrShaderVar& sampler = fProgramBuilder->samplerVariable(samplerHandle);
+ const GrShaderVar& texelBuffer = fProgramBuilder->texelBufferVariable(texelBufferHandle);
SkASSERT(fProgramBuilder->shaderCaps()->texelFetchSupport());
- SkASSERT(GrSLTypeIsCombinedSamplerType(sampler.getType()));
-
- out->appendf("texelFetch(%s, %s)", sampler.c_str(), coordExpr);
- append_texture_swizzle(out, fProgramBuilder->samplerSwizzle(samplerHandle));
+ out->appendf("texelFetch(%s, %s)", texelBuffer.c_str(), coordExpr);
}
-void GrGLSLShaderBuilder::appendTexelFetch(SamplerHandle samplerHandle, const char* coordExpr) {
- this->appendTexelFetch(&this->code(), samplerHandle, coordExpr);
+void GrGLSLShaderBuilder::appendTexelFetch(TexelBufferHandle texelBufferHandle,
+ const char* coordExpr) {
+ this->appendTexelFetch(&this->code(), texelBufferHandle, coordExpr);
}
void GrGLSLShaderBuilder::appendImageStorageLoad(SkString* out, ImageStorageHandle handle,