blob: 8143230495c921d7c46acc0afee6b555f3026a19 [file] [log] [blame]
joshualitt30ba4362014-08-21 20:18:45 -07001/*
2 * Copyright 2014 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8#ifndef GrGLProgramBuilder_DEFINED
9#define GrGLProgramBuilder_DEFINED
10
joshualitt30ba4362014-08-21 20:18:45 -070011#include "GrGLFragmentShaderBuilder.h"
12#include "GrGLGeometryShaderBuilder.h"
13#include "GrGLVertexShaderBuilder.h"
joshualitt47bb3822014-10-07 16:43:25 -070014#include "../GrGLProgramDataManager.h"
kkinnunen7aedda52015-06-29 23:01:28 -070015#include "../GrGLPathProgramDataManager.h"
joshualitt47bb3822014-10-07 16:43:25 -070016#include "../GrGLUniformHandle.h"
joshualitt8072caa2015-02-12 14:20:52 -080017#include "../GrGLPrimitiveProcessor.h"
egdanielc2304142014-12-11 13:15:13 -080018#include "../GrGLXferProcessor.h"
egdaniel8dd688b2015-01-22 10:16:09 -080019#include "../../GrPipeline.h"
joshualitt89c7a2e2014-10-10 14:11:59 -070020
joshualitt47bb3822014-10-07 16:43:25 -070021/*
22 * This is the base class for a series of interfaces. This base class *MUST* remain abstract with
23 * NO data members because it is used in multiple interface inheritance.
24 * Heirarchy:
25 * GrGLUniformBuilder
26 * / \
27 * GrGLFPBuilder GrGLGPBuilder
28 * \ /
29 * GrGLProgramBuilder(internal use only)
30 */
31class GrGLUniformBuilder {
joshualitt30ba4362014-08-21 20:18:45 -070032public:
33 enum ShaderVisibility {
bsalomon17168df2014-12-09 09:00:49 -080034 kVertex_Visibility = 1 << kVertex_GrShaderType,
35 kGeometry_Visibility = 1 << kGeometry_GrShaderType,
36 kFragment_Visibility = 1 << kFragment_GrShaderType,
joshualitt30ba4362014-08-21 20:18:45 -070037 };
38
joshualitt47bb3822014-10-07 16:43:25 -070039 virtual ~GrGLUniformBuilder() {}
40
joshualitt30ba4362014-08-21 20:18:45 -070041 typedef GrGLProgramDataManager::UniformHandle UniformHandle;
kkinnunen7aedda52015-06-29 23:01:28 -070042 typedef GrGLPathProgramDataManager::SeparableVaryingHandle SeparableVaryingHandle;
joshualitt47bb3822014-10-07 16:43:25 -070043
44 /** Add a uniform variable to the current program, that has visibility in one or more shaders.
45 visibility is a bitfield of ShaderVisibility values indicating from which shaders the
46 uniform should be accessible. At least one bit must be set. Geometry shader uniforms are not
47 supported at this time. The actual uniform name will be mangled. If outName is not NULL then
48 it will refer to the final uniform name after return. Use the addUniformArray variant to add
49 an array of uniforms. */
bsalomon422f56f2014-12-09 10:18:12 -080050 UniformHandle addUniform(uint32_t visibility,
51 GrSLType type,
52 GrSLPrecision precision,
53 const char* name,
54 const char** outName = NULL) {
55 return this->addUniformArray(visibility, type, precision, name, 0, outName);
56 }
57
58 virtual UniformHandle addUniformArray(
59 uint32_t visibility,
60 GrSLType type,
61 GrSLPrecision precision,
62 const char* name,
63 int arrayCount,
64 const char** outName = NULL) = 0;
joshualitt47bb3822014-10-07 16:43:25 -070065
66 virtual const GrGLShaderVar& getUniformVariable(UniformHandle u) const = 0;
67
68 /**
69 * Shortcut for getUniformVariable(u).c_str()
70 */
71 virtual const char* getUniformCStr(UniformHandle u) const = 0;
72
73 virtual const GrGLContextInfo& ctxInfo() const = 0;
74
bsalomon861e1032014-12-16 07:33:49 -080075 virtual GrGLGpu* gpu() const = 0;
joshualitt47bb3822014-10-07 16:43:25 -070076
77 /*
78 * *NOTE* NO MEMBERS ALLOWED, MULTIPLE INHERITANCE
79 */
80};
81
joshualitt74077b92014-10-24 11:26:03 -070082// TODO move this into GrGLGPBuilder and move them both out of this file
83class GrGLVarying {
84public:
85 bool vsVarying() const { return kVertToFrag_Varying == fVarying ||
86 kVertToGeo_Varying == fVarying; }
87 bool fsVarying() const { return kVertToFrag_Varying == fVarying ||
88 kGeoToFrag_Varying == fVarying; }
89 const char* vsOut() const { return fVsOut; }
90 const char* gsIn() const { return fGsIn; }
91 const char* gsOut() const { return fGsOut; }
92 const char* fsIn() const { return fFsIn; }
joshualittabb52a12015-01-13 15:02:10 -080093 GrSLType type() const { return fType; }
joshualitt74077b92014-10-24 11:26:03 -070094
95protected:
96 enum Varying {
97 kVertToFrag_Varying,
98 kVertToGeo_Varying,
99 kGeoToFrag_Varying,
100 };
101
102 GrGLVarying(GrSLType type, Varying varying)
103 : fVarying(varying), fType(type), fVsOut(NULL), fGsIn(NULL), fGsOut(NULL),
104 fFsIn(NULL) {}
105
106 Varying fVarying;
107
108private:
109 GrSLType fType;
110 const char* fVsOut;
111 const char* fGsIn;
112 const char* fGsOut;
113 const char* fFsIn;
114
115 friend class GrGLVertexBuilder;
116 friend class GrGLGeometryBuilder;
egdanielc2304142014-12-11 13:15:13 -0800117 friend class GrGLXferBuilder;
joshualitt74077b92014-10-24 11:26:03 -0700118 friend class GrGLFragmentShaderBuilder;
119};
120
121struct GrGLVertToFrag : public GrGLVarying {
122 GrGLVertToFrag(GrSLType type)
123 : GrGLVarying(type, kVertToFrag_Varying) {}
124};
125
126struct GrGLVertToGeo : public GrGLVarying {
127 GrGLVertToGeo(GrSLType type)
128 : GrGLVarying(type, kVertToGeo_Varying) {}
129};
130
131struct GrGLGeoToFrag : public GrGLVarying {
132 GrGLGeoToFrag(GrSLType type)
133 : GrGLVarying(type, kGeoToFrag_Varying) {}
134};
135
joshualitt47bb3822014-10-07 16:43:25 -0700136/* a specialization of the above for GPs. Lets the user add uniforms, varyings, and VS / FS code */
137class GrGLGPBuilder : public virtual GrGLUniformBuilder {
138public:
joshualitt2dd1ae02014-12-03 06:24:10 -0800139 /*
140 * addVarying allows fine grained control for setting up varyings between stages. If you just
141 * need to take an attribute and pass it through to an output value in a fragment shader, use
142 * addPassThroughAttribute.
143 * TODO convert most uses of addVarying to addPassThroughAttribute
144 */
joshualitt74077b92014-10-24 11:26:03 -0700145 virtual void addVarying(const char* name,
146 GrGLVarying*,
bsalomonc0bd6482014-12-09 10:04:14 -0800147 GrSLPrecision fsPrecision = kDefault_GrSLPrecision) = 0;
joshualitt47bb3822014-10-07 16:43:25 -0700148
joshualitt2dd1ae02014-12-03 06:24:10 -0800149 /*
150 * This call can be used by GP to pass an attribute through all shaders directly to 'output' in
151 * the fragment shader. Though this call effects both the vertex shader and fragment shader,
152 * it expects 'output' to be defined in the fragment shader before this call is made.
153 * TODO it might be nicer behavior to have a flag to declare output inside this call
154 */
joshualitt71c92602015-01-14 08:12:47 -0800155 virtual void addPassThroughAttribute(const GrGeometryProcessor::Attribute*,
joshualitt2dd1ae02014-12-03 06:24:10 -0800156 const char* output) = 0;
157
kkinnunen7aedda52015-06-29 23:01:28 -0700158 /*
159 * Creates a fragment shader varying that can be referred to.
160 * Comparable to GrGLUniformBuilder::addUniform().
161 */
162 virtual SeparableVaryingHandle addSeparableVarying(
163 const char* name, GrGLVertToFrag*, GrSLPrecision fsPrecision = kDefault_GrSLPrecision) = 0;
164
joshualitt47bb3822014-10-07 16:43:25 -0700165 // TODO rename getFragmentBuilder
egdaniel29bee0f2015-04-29 11:54:42 -0700166 virtual GrGLFragmentBuilder* getFragmentShaderBuilder() = 0;
joshualitt47bb3822014-10-07 16:43:25 -0700167 virtual GrGLVertexBuilder* getVertexShaderBuilder() = 0;
168
169 /*
170 * *NOTE* NO MEMBERS ALLOWED, MULTIPLE INHERITANCE
171 */
172};
173
174/* a specializations for FPs. Lets the user add uniforms and FS code */
175class GrGLFPBuilder : public virtual GrGLUniformBuilder {
176public:
egdaniel29bee0f2015-04-29 11:54:42 -0700177 virtual GrGLFragmentBuilder* getFragmentShaderBuilder() = 0;
joshualitt47bb3822014-10-07 16:43:25 -0700178
179 /*
180 * *NOTE* NO MEMBERS ALLOWED, MULTIPLE INHERITANCE
181 */
182};
183
egdanielc2304142014-12-11 13:15:13 -0800184/* a specializations for XPs. Lets the user add uniforms and FS code */
185class GrGLXPBuilder : public virtual GrGLUniformBuilder {
186public:
egdaniel29bee0f2015-04-29 11:54:42 -0700187 virtual GrGLXPFragmentBuilder* getFragmentShaderBuilder() = 0;
egdanielc2304142014-12-11 13:15:13 -0800188
189 /*
190 * *NOTE* NO MEMBERS ALLOWED, MULTIPLE INHERITANCE
191 */
192};
joshualittabb52a12015-01-13 15:02:10 -0800193
194/**
195 * The below struct represent processors installed in programs.
196 */
197template <class Proc>
198struct GrGLInstalledProc {
cdalton42717652015-06-18 11:54:30 -0700199 SkDEBUGCODE(int fSamplersIdx;)
200 SkAutoTDelete<Proc> fGLProc;
joshualittabb52a12015-01-13 15:02:10 -0800201};
202
203typedef GrGLInstalledProc<GrGLPrimitiveProcessor> GrGLInstalledGeoProc;
204typedef GrGLInstalledProc<GrGLXferProcessor> GrGLInstalledXferProc;
205typedef GrGLInstalledProc<GrGLFragmentProcessor> GrGLInstalledFragProc;
206
207struct GrGLInstalledFragProcs : public SkRefCnt {
208 virtual ~GrGLInstalledFragProcs();
209 SkSTArray<8, GrGLInstalledFragProc*, true> fProcs;
210};
joshualitta5305a12014-10-10 17:47:00 -0700211
joshualitt47bb3822014-10-07 16:43:25 -0700212/*
213 * Please note - no diamond problems because of virtual inheritance. Also, both base classes
214 * are pure virtual with no data members. This is the base class for program building.
215 * Subclasses are nearly identical but each has their own way of emitting transforms. State for
216 * each of the elements of the shader pipeline, ie vertex, fragment, geometry, etc, lives in those
217 * respective builders
218*/
219class GrGLProgramBuilder : public GrGLGPBuilder,
egdanielc2304142014-12-11 13:15:13 -0800220 public GrGLFPBuilder,
221 public GrGLXPBuilder {
joshualitt47bb3822014-10-07 16:43:25 -0700222public:
joshualitt873ad0e2015-01-20 09:08:51 -0800223 typedef GrGpu::DrawArgs DrawArgs;
joshualitt47bb3822014-10-07 16:43:25 -0700224 /** Generates a shader program.
225 *
226 * The program implements what is specified in the stages given as input.
227 * After successful generation, the builder result objects are available
228 * to be used.
229 * @return true if generation was successful.
230 */
joshualitt873ad0e2015-01-20 09:08:51 -0800231 static GrGLProgram* CreateProgram(const DrawArgs&, GrGLGpu*);
joshualitt47bb3822014-10-07 16:43:25 -0700232
bsalomon422f56f2014-12-09 10:18:12 -0800233 UniformHandle addUniformArray(uint32_t visibility,
234 GrSLType type,
235 GrSLPrecision precision,
236 const char* name,
237 int arrayCount,
mtklein36352bf2015-03-25 18:17:31 -0700238 const char** outName) override;
joshualitt47bb3822014-10-07 16:43:25 -0700239
mtklein36352bf2015-03-25 18:17:31 -0700240 const GrGLShaderVar& getUniformVariable(UniformHandle u) const override {
joshualitt47bb3822014-10-07 16:43:25 -0700241 return fUniforms[u.toShaderBuilderIndex()].fVariable;
242 }
243
mtklein36352bf2015-03-25 18:17:31 -0700244 const char* getUniformCStr(UniformHandle u) const override {
joshualitt47bb3822014-10-07 16:43:25 -0700245 return this->getUniformVariable(u).c_str();
246 }
247
mtklein36352bf2015-03-25 18:17:31 -0700248 const GrGLContextInfo& ctxInfo() const override;
joshualitt47bb3822014-10-07 16:43:25 -0700249
mtklein36352bf2015-03-25 18:17:31 -0700250 GrGLGpu* gpu() const override { return fGpu; }
joshualitt47bb3822014-10-07 16:43:25 -0700251
egdaniel29bee0f2015-04-29 11:54:42 -0700252 GrGLXPFragmentBuilder* getFragmentShaderBuilder() override { return &fFS; }
mtklein36352bf2015-03-25 18:17:31 -0700253 GrGLVertexBuilder* getVertexShaderBuilder() override { return &fVS; }
joshualitt47bb3822014-10-07 16:43:25 -0700254
bsalomon422f56f2014-12-09 10:18:12 -0800255 void addVarying(
joshualitta5305a12014-10-10 17:47:00 -0700256 const char* name,
joshualitt74077b92014-10-24 11:26:03 -0700257 GrGLVarying*,
mtklein36352bf2015-03-25 18:17:31 -0700258 GrSLPrecision fsPrecision = kDefault_GrSLPrecision) override;
joshualitt30ba4362014-08-21 20:18:45 -0700259
joshualitt71c92602015-01-14 08:12:47 -0800260 void addPassThroughAttribute(const GrPrimitiveProcessor::Attribute*,
mtklein36352bf2015-03-25 18:17:31 -0700261 const char* output) override;
joshualitt2dd1ae02014-12-03 06:24:10 -0800262
kkinnunen7aedda52015-06-29 23:01:28 -0700263 SeparableVaryingHandle addSeparableVarying(
264 const char* name,
265 GrGLVertToFrag*,
266 GrSLPrecision fsPrecision = kDefault_GrSLPrecision) override;
joshualitt2dd1ae02014-12-03 06:24:10 -0800267
joshualitt30ba4362014-08-21 20:18:45 -0700268 // Handles for program uniforms (other than per-effect uniforms)
269 struct BuiltinUniformHandles {
joshualitt30ba4362014-08-21 20:18:45 -0700270 UniformHandle fRTAdjustmentUni;
joshualitt30ba4362014-08-21 20:18:45 -0700271
272 // We use the render target height to provide a y-down frag coord when specifying
273 // origin_upper_left is not supported.
274 UniformHandle fRTHeightUni;
joshualitt30ba4362014-08-21 20:18:45 -0700275 };
276
joshualittdb0d3ca2014-10-07 12:42:26 -0700277protected:
joshualitta5305a12014-10-10 17:47:00 -0700278 typedef GrGLProgramDataManager::UniformInfo UniformInfo;
279 typedef GrGLProgramDataManager::UniformInfoArray UniformInfoArray;
280
joshualitt873ad0e2015-01-20 09:08:51 -0800281 static GrGLProgramBuilder* CreateProgramBuilder(const DrawArgs&, GrGLGpu*);
joshualitt47bb3822014-10-07 16:43:25 -0700282
joshualitt873ad0e2015-01-20 09:08:51 -0800283 GrGLProgramBuilder(GrGLGpu*, const DrawArgs&);
joshualitt30ba4362014-08-21 20:18:45 -0700284
joshualitt873ad0e2015-01-20 09:08:51 -0800285 const GrPrimitiveProcessor& primitiveProcessor() const { return *fArgs.fPrimitiveProcessor; }
egdaniel8dd688b2015-01-22 10:16:09 -0800286 const GrPipeline& pipeline() const { return *fArgs.fPipeline; }
joshualitt873ad0e2015-01-20 09:08:51 -0800287 const GrProgramDesc& desc() const { return *fArgs.fDesc; }
288 const GrBatchTracker& batchTracker() const { return *fArgs.fBatchTracker; }
289 const GrProgramDesc::KeyHeader& header() const { return fArgs.fDesc->header(); }
joshualitt23e280d2014-09-18 12:26:38 -0700290
joshualitt30ba4362014-08-21 20:18:45 -0700291 // Generates a name for a variable. The generated string will be name prefixed by the prefix
292 // char (unless the prefix is '\0'). It also mangles the name to be stage-specific if we're
293 // generating stage code.
294 void nameVariable(SkString* out, char prefix, const char* name);
joshualitt2dd1ae02014-12-03 06:24:10 -0800295 // Generates a possibly mangled name for a stage variable and writes it to the fragment shader.
296 // If GrGLSLExpr4 has a valid name then it will use that instead
297 void nameExpression(GrGLSLExpr4*, const char* baseName);
joshualitt6c891102015-05-13 08:51:49 -0700298 bool emitAndInstallProcs(GrGLSLExpr4* inputColor, GrGLSLExpr4* inputCoverage);
joshualitta5305a12014-10-10 17:47:00 -0700299 void emitAndInstallFragProcs(int procOffset, int numProcs, GrGLSLExpr4* inOut);
joshualitt2dd1ae02014-12-03 06:24:10 -0800300 void emitAndInstallProc(const GrPendingFragmentStage&,
joshualitta5305a12014-10-10 17:47:00 -0700301 int index,
joshualitta5305a12014-10-10 17:47:00 -0700302 const GrGLSLExpr4& input,
303 GrGLSLExpr4* output);
304
joshualitt9b989322014-12-15 14:16:27 -0800305 void emitAndInstallProc(const GrPrimitiveProcessor&,
joshualitt2dd1ae02014-12-03 06:24:10 -0800306 GrGLSLExpr4* outputColor,
307 GrGLSLExpr4* outputCoverage);
308
joshualitta5305a12014-10-10 17:47:00 -0700309 // these emit functions help to keep the createAndEmitProcessors template general
bsalomonae59b772014-11-19 08:23:49 -0800310 void emitAndInstallProc(const GrPendingFragmentStage&,
joshualittabb52a12015-01-13 15:02:10 -0800311 int index,
joshualitta5305a12014-10-10 17:47:00 -0700312 const char* outColor,
313 const char* inColor);
joshualitt9b989322014-12-15 14:16:27 -0800314 void emitAndInstallProc(const GrPrimitiveProcessor&,
joshualitt2dd1ae02014-12-03 06:24:10 -0800315 const char* outColor,
316 const char* outCoverage);
egdanielc2304142014-12-11 13:15:13 -0800317 void emitAndInstallXferProc(const GrXferProcessor&,
318 const GrGLSLExpr4& colorIn,
319 const GrGLSLExpr4& coverageIn);
joshualitt2dd1ae02014-12-03 06:24:10 -0800320
joshualitt9b989322014-12-15 14:16:27 -0800321 void verify(const GrPrimitiveProcessor&);
egdanielc2304142014-12-11 13:15:13 -0800322 void verify(const GrXferProcessor&);
joshualitt47bb3822014-10-07 16:43:25 -0700323 void verify(const GrFragmentProcessor&);
joshualittabb52a12015-01-13 15:02:10 -0800324 template <class Proc>
joshualitt47bb3822014-10-07 16:43:25 -0700325 void emitSamplers(const GrProcessor&,
326 GrGLProcessor::TextureSamplerArray* outSamplers,
joshualittabb52a12015-01-13 15:02:10 -0800327 GrGLInstalledProc<Proc>*);
joshualitt30ba4362014-08-21 20:18:45 -0700328
joshualitt47bb3822014-10-07 16:43:25 -0700329 GrGLProgram* finalize();
jvanverth2853fe42015-07-02 12:53:27 -0700330 void bindProgramResourceLocations(GrGLuint programID);
joshualitt47bb3822014-10-07 16:43:25 -0700331 bool checkLinkStatus(GrGLuint programID);
kkinnunen7aedda52015-06-29 23:01:28 -0700332 virtual void resolveProgramResourceLocations(GrGLuint programID);
joshualitt47bb3822014-10-07 16:43:25 -0700333 void cleanupProgram(GrGLuint programID, const SkTDArray<GrGLuint>& shaderIDs);
334 void cleanupShaders(const SkTDArray<GrGLuint>& shaderIDs);
joshualitt30ba4362014-08-21 20:18:45 -0700335
joshualitt47bb3822014-10-07 16:43:25 -0700336 // Subclasses create different programs
337 virtual GrGLProgram* createProgram(GrGLuint programID);
338
joshualitt30ba4362014-08-21 20:18:45 -0700339 void appendUniformDecls(ShaderVisibility, SkString*) const;
340
joshualitt47bb3822014-10-07 16:43:25 -0700341 // reset is called by program creator between each processor's emit code. It increments the
342 // stage offset for variable name mangling, and also ensures verfication variables in the
343 // fragment shader are cleared.
344 void reset() {
345 this->enterStage();
346 this->addStage();
347 fFS.reset();
348 }
349 void addStage() { fStageIndex++; }
350
351 // This simple class exits the stage and then restores the stage when it goes out of scope
352 class AutoStageRestore {
joshualitt30ba4362014-08-21 20:18:45 -0700353 public:
joshualitt47bb3822014-10-07 16:43:25 -0700354 AutoStageRestore(GrGLProgramBuilder* pb)
355 : fPB(pb), fOutOfStage(pb->fOutOfStage) { pb->exitStage(); }
356 ~AutoStageRestore() { fPB->fOutOfStage = fOutOfStage; }
joshualittb0a8a372014-09-23 09:50:21 -0700357 private:
joshualitt47bb3822014-10-07 16:43:25 -0700358 GrGLProgramBuilder* fPB;
359 bool fOutOfStage;
joshualittb0a8a372014-09-23 09:50:21 -0700360 };
joshualitt47bb3822014-10-07 16:43:25 -0700361 class AutoStageAdvance {
joshualittdb0d3ca2014-10-07 12:42:26 -0700362 public:
joshualitt43466a12015-02-13 17:18:27 -0800363 AutoStageAdvance(GrGLProgramBuilder* pb)
364 : fPB(pb) {
365 fPB->reset();
366 // Each output to the fragment processor gets its own code section
367 fPB->fFS.nextStage();
368 }
joshualitt47bb3822014-10-07 16:43:25 -0700369 ~AutoStageAdvance() { fPB->exitStage(); }
joshualittdb0d3ca2014-10-07 12:42:26 -0700370 private:
joshualitt47bb3822014-10-07 16:43:25 -0700371 GrGLProgramBuilder* fPB;
372 };
373 void exitStage() { fOutOfStage = true; }
374 void enterStage() { fOutOfStage = false; }
375 int stageIndex() const { return fStageIndex; }
376
joshualitt4973d9d2014-11-08 09:24:25 -0800377 const char* rtAdjustment() const { return "rtAdjustment"; }
378
joshualitt47bb3822014-10-07 16:43:25 -0700379 // number of each input/output type in a single allocation block, used by many builders
380 static const int kVarsPerBlock;
381
382 BuiltinUniformHandles fUniformHandles;
383 GrGLVertexBuilder fVS;
384 GrGLGeometryBuilder fGS;
385 GrGLFragmentShaderBuilder fFS;
386 bool fOutOfStage;
387 int fStageIndex;
388
joshualitta5305a12014-10-10 17:47:00 -0700389 GrGLInstalledGeoProc* fGeometryProcessor;
egdanielc2304142014-12-11 13:15:13 -0800390 GrGLInstalledXferProc* fXferProcessor;
joshualitta5305a12014-10-10 17:47:00 -0700391 SkAutoTUnref<GrGLInstalledFragProcs> fFragmentProcessors;
joshualitt47bb3822014-10-07 16:43:25 -0700392
joshualitt873ad0e2015-01-20 09:08:51 -0800393 const DrawArgs& fArgs;
bsalomon861e1032014-12-16 07:33:49 -0800394 GrGLGpu* fGpu;
joshualitt47bb3822014-10-07 16:43:25 -0700395 UniformInfoArray fUniforms;
joshualittabb52a12015-01-13 15:02:10 -0800396 GrGLPrimitiveProcessor::TransformsIn fCoordTransforms;
397 GrGLPrimitiveProcessor::TransformsOut fOutCoords;
cdalton42717652015-06-18 11:54:30 -0700398 SkTArray<UniformHandle> fSamplerUniforms;
joshualitt47bb3822014-10-07 16:43:25 -0700399
400 friend class GrGLShaderBuilder;
401 friend class GrGLVertexBuilder;
402 friend class GrGLFragmentShaderBuilder;
403 friend class GrGLGeometryBuilder;
404};
joshualitt30ba4362014-08-21 20:18:45 -0700405#endif