diff options
author | Greg Daniel <egdaniel@google.com> | 2017-05-05 10:28:42 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-05-05 15:04:13 +0000 |
commit | bc5d4d769098a4fb46685c0e59034dc8e12318a2 (patch) | |
tree | 1a3ff07875fb27d058f3d2369b30b9b62f7d6324 /src/gpu/glsl/GrGLSLUniformHandler.h | |
parent | 288d041c64322fafc77cfaf23907180ebad933a1 (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/GrGLSLUniformHandler.h')
-rw-r--r-- | src/gpu/glsl/GrGLSLUniformHandler.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gpu/glsl/GrGLSLUniformHandler.h b/src/gpu/glsl/GrGLSLUniformHandler.h index 3d21c1cc4b..cf80c3ff0a 100644 --- a/src/gpu/glsl/GrGLSLUniformHandler.h +++ b/src/gpu/glsl/GrGLSLUniformHandler.h @@ -20,6 +20,7 @@ public: using UniformHandle = GrGLSLProgramDataManager::UniformHandle; GR_DEFINE_RESOURCE_HANDLE_CLASS(SamplerHandle); + GR_DEFINE_RESOURCE_HANDLE_CLASS(TexelBufferHandle); GR_DEFINE_RESOURCE_HANDLE_CLASS(ImageStorageHandle); /** Add a uniform variable to the current program, that has visibility in one or more shaders. @@ -68,6 +69,10 @@ private: virtual SamplerHandle addSampler(uint32_t visibility, GrSwizzle, GrSLType, GrSLPrecision, const char* name) = 0; + virtual const GrShaderVar& texelBufferVariable(TexelBufferHandle) const = 0; + virtual TexelBufferHandle addTexelBuffer(uint32_t visibility, GrSLPrecision, + const char* name) = 0; + virtual const GrShaderVar& imageStorageVariable(ImageStorageHandle) const = 0; virtual ImageStorageHandle addImageStorage(uint32_t visibility, GrSLType type, GrImageStorageFormat, GrSLMemoryModel, GrSLRestrict, |