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

Unified Diff: src/gpu/glsl/GrGLSLProgramBuilder.h

Issue 1782583002: Add support for vertex and geometry shader textures (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: better rebase Created 4 years, 9 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/GrGLSLCaps.cpp ('k') | src/gpu/glsl/GrGLSLProgramBuilder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/glsl/GrGLSLProgramBuilder.h
diff --git a/src/gpu/glsl/GrGLSLProgramBuilder.h b/src/gpu/glsl/GrGLSLProgramBuilder.h
index b8669bf2f6e70699b84937c3ad73d6ff7fe48253..83c004da98d0c4cab0e80ff3156574766c31f742 100644
--- a/src/gpu/glsl/GrGLSLProgramBuilder.h
+++ b/src/gpu/glsl/GrGLSLProgramBuilder.h
@@ -93,12 +93,16 @@ public:
protected:
explicit GrGLSLProgramBuilder(const DrawArgs& args);
- bool emitAndInstallProcs(GrGLSLExpr4* inputColor, GrGLSLExpr4* inputCoverage, int maxTextures);
+ void addFeature(GrShaderFlags shaders, uint32_t featureBit, const char* extensionName);
+
+ bool emitAndInstallProcs(GrGLSLExpr4* inputColor, GrGLSLExpr4* inputCoverage);
void cleanupFragmentProcessors();
void finalizeShaders();
+ SkTArray<UniformHandle> fSamplerUniforms;
+
private:
// reset is called by program creator between each processor's emit code. It increments the
// stage offset for variable name mangling, and also ensures verfication variables in the
@@ -139,7 +143,10 @@ private:
const GrGLSLExpr4& coverageIn,
bool ignoresCoverage,
GrPixelLocalStorageState plsState);
+ void emitSamplers(const GrProcessor& processor,
+ GrGLSLTextureSampler::TextureSamplerArray* outSamplers);
void emitFSOutputSwizzle(bool hasSecondaryOutput);
+ bool checkSamplerCounts();
#ifdef SK_DEBUG
void verify(const GrPrimitiveProcessor&);
@@ -147,11 +154,11 @@ private:
void verify(const GrFragmentProcessor&);
#endif
- virtual void emitSamplers(const GrProcessor& processor,
- GrGLSLTextureSampler::TextureSamplerArray* outSamplers) = 0;
-
- GrGLSLPrimitiveProcessor::TransformsIn fCoordTransforms;
- GrGLSLPrimitiveProcessor::TransformsOut fOutCoords;
+ GrGLSLPrimitiveProcessor::TransformsIn fCoordTransforms;
+ GrGLSLPrimitiveProcessor::TransformsOut fOutCoords;
+ int fNumVertexSamplers;
+ int fNumGeometrySamplers;
+ int fNumFragmentSamplers;
};
#endif
« no previous file with comments | « src/gpu/glsl/GrGLSLCaps.cpp ('k') | src/gpu/glsl/GrGLSLProgramBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698