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, |
134 kNoPerspectiveInterpolation_GLSLPrivateFeature, | 135 kNoPerspectiveInterpolation_GLSLPrivateFeature, |
135 kLastGLSLPrivateFeature = kNoPerspectiveInterpolation_GLSLPrivateFeature | 136 kLastGLSLPrivateFeature = kNoPerspectiveInterpolation_GLSLPrivateFeature |
136 }; | 137 }; |
137 | 138 |
138 /* | 139 /* |
139 * A general function which enables an extension in a shader if the feature
bit is not present | 140 * 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. |
140 */ | 143 */ |
141 void addFeature(uint32_t featureBit, const char* extensionName); | 144 bool addFeature(uint32_t featureBit, const char* extensionName); |
142 | 145 |
143 enum InterfaceQualifier { | 146 enum InterfaceQualifier { |
144 kOut_InterfaceQualifier, | 147 kOut_InterfaceQualifier, |
145 kLastInterfaceQualifier = kOut_InterfaceQualifier | 148 kLastInterfaceQualifier = kOut_InterfaceQualifier |
146 }; | 149 }; |
147 | 150 |
148 /* | 151 /* |
149 * A low level function to build default layout qualifiers. | 152 * A low level function to build default layout qualifiers. |
150 * | 153 * |
151 * e.g. layout(param1, param2, ...) out; | 154 * e.g. layout(param1, param2, ...) out; |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 int fCodeIndex; | 207 int fCodeIndex; |
205 bool fFinalized; | 208 bool fFinalized; |
206 | 209 |
207 friend class GrGLSLProgramBuilder; | 210 friend class GrGLSLProgramBuilder; |
208 friend class GrGLProgramBuilder; | 211 friend class GrGLProgramBuilder; |
209 friend class GrGLSLVaryingHandler; // to access noperspective interpolation
feature. | 212 friend class GrGLSLVaryingHandler; // to access noperspective interpolation
feature. |
210 friend class GrGLPathProgramBuilder; // to access fInputs. | 213 friend class GrGLPathProgramBuilder; // to access fInputs. |
211 friend class GrVkProgramBuilder; | 214 friend class GrVkProgramBuilder; |
212 }; | 215 }; |
213 #endif | 216 #endif |
OLD | NEW |