OLD | NEW |
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 GrGLSLShaderBuilder_DEFINED | 8 #ifndef GrGLSLShaderBuilder_DEFINED |
9 #define GrGLSLShaderBuilder_DEFINED | 9 #define GrGLSLShaderBuilder_DEFINED |
10 | 10 |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 | 124 |
125 /** | 125 /** |
126 * Features that should only be enabled internally by the builders. | 126 * Features that should only be enabled internally by the builders. |
127 */ | 127 */ |
128 enum GLSLPrivateFeature { | 128 enum GLSLPrivateFeature { |
129 kFragCoordConventions_GLSLPrivateFeature, | 129 kFragCoordConventions_GLSLPrivateFeature, |
130 kBlendEquationAdvanced_GLSLPrivateFeature, | 130 kBlendEquationAdvanced_GLSLPrivateFeature, |
131 kBlendFuncExtended_GLSLPrivateFeature, | 131 kBlendFuncExtended_GLSLPrivateFeature, |
132 kExternalTexture_GLSLPrivateFeature, | 132 kExternalTexture_GLSLPrivateFeature, |
133 kFramebufferFetch_GLSLPrivateFeature, | 133 kFramebufferFetch_GLSLPrivateFeature, |
134 kSampleMaskOverrideCoverage_GLSLPrivateFeature, | |
135 kNoPerspectiveInterpolation_GLSLPrivateFeature, | 134 kNoPerspectiveInterpolation_GLSLPrivateFeature, |
136 kLastGLSLPrivateFeature = kNoPerspectiveInterpolation_GLSLPrivateFeature | 135 kLastGLSLPrivateFeature = kNoPerspectiveInterpolation_GLSLPrivateFeature |
137 }; | 136 }; |
138 | 137 |
139 /* | 138 /* |
140 * A general function which enables an extension in a shader if the feature
bit is not present | 139 * A general function which enables an extension in a shader if the feature
bit is not present |
141 * | |
142 * @return true if the feature bit was not yet present, false otherwise. | |
143 */ | 140 */ |
144 bool addFeature(uint32_t featureBit, const char* extensionName); | 141 void addFeature(uint32_t featureBit, const char* extensionName); |
145 | 142 |
146 enum InterfaceQualifier { | 143 enum InterfaceQualifier { |
147 kOut_InterfaceQualifier, | 144 kOut_InterfaceQualifier, |
148 kLastInterfaceQualifier = kOut_InterfaceQualifier | 145 kLastInterfaceQualifier = kOut_InterfaceQualifier |
149 }; | 146 }; |
150 | 147 |
151 /* | 148 /* |
152 * A low level function to build default layout qualifiers. | 149 * A low level function to build default layout qualifiers. |
153 * | 150 * |
154 * e.g. layout(param1, param2, ...) out; | 151 * e.g. layout(param1, param2, ...) out; |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 int fCodeIndex; | 204 int fCodeIndex; |
208 bool fFinalized; | 205 bool fFinalized; |
209 | 206 |
210 friend class GrGLSLProgramBuilder; | 207 friend class GrGLSLProgramBuilder; |
211 friend class GrGLProgramBuilder; | 208 friend class GrGLProgramBuilder; |
212 friend class GrGLSLVaryingHandler; // to access noperspective interpolation
feature. | 209 friend class GrGLSLVaryingHandler; // to access noperspective interpolation
feature. |
213 friend class GrGLPathProgramBuilder; // to access fInputs. | 210 friend class GrGLPathProgramBuilder; // to access fInputs. |
214 friend class GrVkProgramBuilder; | 211 friend class GrVkProgramBuilder; |
215 }; | 212 }; |
216 #endif | 213 #endif |
OLD | NEW |