aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/GrGLProgram.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/gl/GrGLProgram.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/gl/GrGLProgram.h')
-rw-r--r--src/gpu/gl/GrGLProgram.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/gpu/gl/GrGLProgram.h b/src/gpu/gl/GrGLProgram.h
index f9b84d8031..d6bde9a094 100644
--- a/src/gpu/gl/GrGLProgram.h
+++ b/src/gpu/gl/GrGLProgram.h
@@ -111,7 +111,8 @@ protected:
const BuiltinUniformHandles&,
GrGLuint programID,
const UniformInfoArray& uniforms,
- const UniformInfoArray& samplers,
+ const UniformInfoArray& textureSamplers,
+ const UniformInfoArray& texelBuffers,
const UniformInfoArray& imageStorages,
const VaryingInfoArray&, // used for NVPR only currently
GrGLSLPrimitiveProcessor* geometryProcessor,
@@ -119,13 +120,15 @@ protected:
const GrGLSLFragProcs& fragmentProcessors);
// A helper to loop over effects, set the transforms (via subclass) and bind textures
- void setFragmentData(const GrPrimitiveProcessor&, const GrPipeline&, int* nextSamplerIdx);
+ void setFragmentData(const GrPrimitiveProcessor&, const GrPipeline&, int* nextTexSamplerIdx,
+ int* nextTexelBufferIdx, int* nextImageStorageIdx);
// Helper for setData() that sets the view matrix and loads the render target height uniform
void setRenderTargetState(const GrPrimitiveProcessor&, const GrRenderTarget*);
// Helper for setData() that binds textures and texel buffers to the appropriate texture units
- void bindTextures(const GrResourceIOProcessor&, bool allowSRGBInputs, int* nextSamplerIdx);
+ void bindTextures(const GrResourceIOProcessor&, bool allowSRGBInputs, int* nextSamplerIdx,
+ int* nextTexelBufferIdx, int* nextImageStorageIdx);
// Helper for generateMipmaps() that ensures mipmaps are up to date
void generateMipmaps(const GrResourceIOProcessor&, bool allowSRGBInputs);
@@ -144,6 +147,10 @@ protected:
GrGLGpu* fGpu;
GrGLProgramDataManager fProgramDataManager;
+ int fNumTextureSamplers;
+ int fNumTexelBuffers;
+ int fNumImageStorages;
+
friend class GrGLProgramBuilder;
typedef SkRefCnt INHERITED;