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

Side by Side Diff: src/gpu/gl/builders/GrGLShaderBuilder.h

Issue 1420033005: Create swizzle table inside of glsl caps (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 1 month 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/gl/GrGLProgramDesc.cpp ('k') | src/gpu/gl/builders/GrGLShaderBuilder.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 2014 Google Inc. 2 * Copyright 2014 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 GrGLShaderBuilder_DEFINED 8 #ifndef GrGLShaderBuilder_DEFINED
9 #define GrGLShaderBuilder_DEFINED 9 #define GrGLShaderBuilder_DEFINED
10 10
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 } 119 }
120 private: 120 private:
121 GrGLShaderBuilder* fBuilder; 121 GrGLShaderBuilder* fBuilder;
122 }; 122 };
123 123
124 protected: 124 protected:
125 typedef GrTAllocator<GrGLSLShaderVar> VarArray; 125 typedef GrTAllocator<GrGLSLShaderVar> VarArray;
126 void appendDecls(const VarArray& vars, SkString* out) const; 126 void appendDecls(const VarArray& vars, SkString* out) const;
127 127
128 /* 128 /*
129 * this super low level function is just for use internally to builders
130 */
131 void appendTextureLookup(const char* samplerName,
132 const char* coordName,
133 uint32_t configComponentMask,
134 const char* swizzle);
135
136 /*
137 * A general function which enables an extension in a shader if the feature bit is not present 129 * A general function which enables an extension in a shader if the feature bit is not present
138 */ 130 */
139 void addFeature(uint32_t featureBit, const char* extensionName); 131 void addFeature(uint32_t featureBit, const char* extensionName);
140 132
141 enum InterfaceQualifier { 133 enum InterfaceQualifier {
142 kOut_InterfaceQualifier, 134 kOut_InterfaceQualifier,
143 kLastInterfaceQualifier = kOut_InterfaceQualifier 135 kLastInterfaceQualifier = kOut_InterfaceQualifier
144 }; 136 };
145 137
146 /* 138 /*
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 VarArray fOutputs; 191 VarArray fOutputs;
200 uint32_t fFeaturesAddedMask; 192 uint32_t fFeaturesAddedMask;
201 SkSTArray<1, SkString> fLayoutParams[kLastInterfaceQualifier + 1]; 193 SkSTArray<1, SkString> fLayoutParams[kLastInterfaceQualifier + 1];
202 int fCodeIndex; 194 int fCodeIndex;
203 bool fFinalized; 195 bool fFinalized;
204 196
205 friend class GrGLProgramBuilder; 197 friend class GrGLProgramBuilder;
206 friend class GrGLPathProgramBuilder; // to access fInputs. 198 friend class GrGLPathProgramBuilder; // to access fInputs.
207 }; 199 };
208 #endif 200 #endif
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLProgramDesc.cpp ('k') | src/gpu/gl/builders/GrGLShaderBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698