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

Side by Side Diff: src/gpu/glsl/GrGLSLProgramBuilder.h

Issue 1734163002: Replace fWillReadFragmentPosition with a bitfield (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: BuiltInState -> RequiredFeatures 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 unified diff | Download patch
« no previous file with comments | « src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp ('k') | src/gpu/glsl/GrGLSLProgramBuilder.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef GrGLSLProgramBuilder_DEFINED 8 #ifndef GrGLSLProgramBuilder_DEFINED
9 #define GrGLSLProgramBuilder_DEFINED 9 #define GrGLSLProgramBuilder_DEFINED
10 10
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 void cleanupFragmentProcessors(); 98 void cleanupFragmentProcessors();
99 99
100 void finalizeShaders(); 100 void finalizeShaders();
101 101
102 private: 102 private:
103 // reset is called by program creator between each processor's emit code. I t increments the 103 // reset is called by program creator between each processor's emit code. I t increments the
104 // stage offset for variable name mangling, and also ensures verfication var iables in the 104 // stage offset for variable name mangling, and also ensures verfication var iables in the
105 // fragment shader are cleared. 105 // fragment shader are cleared.
106 void reset() { 106 void reset() {
107 this->addStage(); 107 this->addStage();
108 fFS.reset(); 108 SkDEBUGCODE(fFS.resetVerification();)
109 } 109 }
110 void addStage() { fStageIndex++; } 110 void addStage() { fStageIndex++; }
111 111
112 class AutoStageAdvance { 112 class AutoStageAdvance {
113 public: 113 public:
114 AutoStageAdvance(GrGLSLProgramBuilder* pb) 114 AutoStageAdvance(GrGLSLProgramBuilder* pb)
115 : fPB(pb) { 115 : fPB(pb) {
116 fPB->reset(); 116 fPB->reset();
117 // Each output to the fragment processor gets its own code section 117 // Each output to the fragment processor gets its own code section
118 fPB->fFS.nextStage(); 118 fPB->fFS.nextStage();
(...skipping 15 matching lines...) Expand all
134 int index, 134 int index,
135 const GrGLSLExpr4& input, 135 const GrGLSLExpr4& input,
136 GrGLSLExpr4* output); 136 GrGLSLExpr4* output);
137 void emitAndInstallXferProc(const GrXferProcessor&, 137 void emitAndInstallXferProc(const GrXferProcessor&,
138 const GrGLSLExpr4& colorIn, 138 const GrGLSLExpr4& colorIn,
139 const GrGLSLExpr4& coverageIn, 139 const GrGLSLExpr4& coverageIn,
140 bool ignoresCoverage, 140 bool ignoresCoverage,
141 GrPixelLocalStorageState plsState); 141 GrPixelLocalStorageState plsState);
142 void emitFSOutputSwizzle(bool hasSecondaryOutput); 142 void emitFSOutputSwizzle(bool hasSecondaryOutput);
143 143
144 #ifdef SK_DEBUG
144 void verify(const GrPrimitiveProcessor&); 145 void verify(const GrPrimitiveProcessor&);
145 void verify(const GrXferProcessor&); 146 void verify(const GrXferProcessor&);
146 void verify(const GrFragmentProcessor&); 147 void verify(const GrFragmentProcessor&);
148 #endif
147 149
148 virtual void emitSamplers(const GrProcessor& processor, 150 virtual void emitSamplers(const GrProcessor& processor,
149 GrGLSLTextureSampler::TextureSamplerArray* outSamp lers) = 0; 151 GrGLSLTextureSampler::TextureSamplerArray* outSamp lers) = 0;
150 152
151 GrGLSLPrimitiveProcessor::TransformsIn fCoordTransforms; 153 GrGLSLPrimitiveProcessor::TransformsIn fCoordTransforms;
152 GrGLSLPrimitiveProcessor::TransformsOut fOutCoords; 154 GrGLSLPrimitiveProcessor::TransformsOut fOutCoords;
153 }; 155 };
154 156
155 #endif 157 #endif
OLDNEW
« no previous file with comments | « src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp ('k') | src/gpu/glsl/GrGLSLProgramBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698