aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/glsl/GrGLSLShaderBuilder.h
diff options
context:
space:
mode:
authorGravatar Greg Daniel <egdaniel@google.com>2017-05-05 10:28:42 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-05-05 15:04:13 +0000
commitbc5d4d769098a4fb46685c0e59034dc8e12318a2 (patch)
tree1a3ff07875fb27d058f3d2369b30b9b62f7d6324 /src/gpu/glsl/GrGLSLShaderBuilder.h
parent288d041c64322fafc77cfaf23907180ebad933a1 (diff)
Split tracking of TexelBuffers from normal samplers
This is precursor CL to add support for texel buffers in Vulkan. This change as includes fixes to the ordering of assigning locations and texture units so that they match in GrGLProgramDataManager and GrGLProgram. Bug: skia: Change-Id: I30c9578fb7dcb187256f744e07651e8564f93a6b Reviewed-on: https://skia-review.googlesource.com/15225 Reviewed-by: Chris Dalton <csmartdalton@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'src/gpu/glsl/GrGLSLShaderBuilder.h')
-rw-r--r--src/gpu/glsl/GrGLSLShaderBuilder.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gpu/glsl/GrGLSLShaderBuilder.h b/src/gpu/glsl/GrGLSLShaderBuilder.h
index 2d6aaf08fa..16e5b8606c 100644
--- a/src/gpu/glsl/GrGLSLShaderBuilder.h
+++ b/src/gpu/glsl/GrGLSLShaderBuilder.h
@@ -26,6 +26,7 @@ public:
virtual ~GrGLSLShaderBuilder() {}
using SamplerHandle = GrGLSLUniformHandler::SamplerHandle;
+ using TexelBufferHandle = GrGLSLUniformHandler::TexelBufferHandle;
using ImageStorageHandle = GrGLSLUniformHandler::ImageStorageHandle;
/** Appends a 2D texture sample with projection if necessary. coordType must either be Vec2f or
@@ -68,10 +69,10 @@ public:
/** Fetches an unfiltered texel from a sampler at integer coordinates. coordExpr must match the
dimensionality of the sampler and must be within the sampler's range. coordExpr is emitted
exactly once, so expressions like "idx++" are acceptable. */
- void appendTexelFetch(SkString* out, SamplerHandle, const char* coordExpr) const;
+ void appendTexelFetch(SkString* out, TexelBufferHandle, const char* coordExpr) const;
/** Version of above that appends the result to the shader code instead.*/
- void appendTexelFetch(SamplerHandle, const char* coordExpr);
+ void appendTexelFetch(TexelBufferHandle, const char* coordExpr);
/** Creates a string of shader code that performs an image load. */
void appendImageStorageLoad(SkString* out, ImageStorageHandle, const char* coordExpr);