| 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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 /** | 145 /** |
| 146 * Features that should only be enabled internally by the builders. | 146 * Features that should only be enabled internally by the builders. |
| 147 */ | 147 */ |
| 148 enum GLSLPrivateFeature { | 148 enum GLSLPrivateFeature { |
| 149 kFragCoordConventions_GLSLPrivateFeature, | 149 kFragCoordConventions_GLSLPrivateFeature, |
| 150 kBlendEquationAdvanced_GLSLPrivateFeature, | 150 kBlendEquationAdvanced_GLSLPrivateFeature, |
| 151 kBlendFuncExtended_GLSLPrivateFeature, | 151 kBlendFuncExtended_GLSLPrivateFeature, |
| 152 kExternalTexture_GLSLPrivateFeature, | 152 kExternalTexture_GLSLPrivateFeature, |
| 153 kFramebufferFetch_GLSLPrivateFeature, | 153 kFramebufferFetch_GLSLPrivateFeature, |
| 154 kNoPerspectiveInterpolation_GLSLPrivateFeature, | 154 kNoPerspectiveInterpolation_GLSLPrivateFeature, |
| 155 kLastGLSLPrivateFeature = kNoPerspectiveInterpolation_GLSLPrivateFeature | 155 kSampleVariables_GLSLPrivateFeature, |
| 156 kSampleMaskOverrideCoverage_GLSLPrivateFeature, |
| 157 kLastGLSLPrivateFeature = kSampleMaskOverrideCoverage_GLSLPrivateFeature |
| 156 }; | 158 }; |
| 157 | 159 |
| 158 /* | 160 /* |
| 159 * A general function which enables an extension in a shader if the feature
bit is not present | 161 * A general function which enables an extension in a shader if the feature
bit is not present |
| 162 * |
| 163 * @return true if the feature bit was not yet present, false otherwise. |
| 160 */ | 164 */ |
| 161 void addFeature(uint32_t featureBit, const char* extensionName); | 165 bool addFeature(uint32_t featureBit, const char* extensionName); |
| 162 | 166 |
| 163 enum InterfaceQualifier { | 167 enum InterfaceQualifier { |
| 164 kOut_InterfaceQualifier, | 168 kOut_InterfaceQualifier, |
| 165 kLastInterfaceQualifier = kOut_InterfaceQualifier | 169 kLastInterfaceQualifier = kOut_InterfaceQualifier |
| 166 }; | 170 }; |
| 167 | 171 |
| 168 /* | 172 /* |
| 169 * A low level function to build default layout qualifiers. | 173 * A low level function to build default layout qualifiers. |
| 170 * | 174 * |
| 171 * e.g. layout(param1, param2, ...) out; | 175 * e.g. layout(param1, param2, ...) out; |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 int fCodeIndex; | 230 int fCodeIndex; |
| 227 bool fFinalized; | 231 bool fFinalized; |
| 228 | 232 |
| 229 friend class GrGLSLProgramBuilder; | 233 friend class GrGLSLProgramBuilder; |
| 230 friend class GrGLProgramBuilder; | 234 friend class GrGLProgramBuilder; |
| 231 friend class GrGLSLVaryingHandler; // to access noperspective interpolation
feature. | 235 friend class GrGLSLVaryingHandler; // to access noperspective interpolation
feature. |
| 232 friend class GrGLPathProgramBuilder; // to access fInputs. | 236 friend class GrGLPathProgramBuilder; // to access fInputs. |
| 233 friend class GrVkProgramBuilder; | 237 friend class GrVkProgramBuilder; |
| 234 }; | 238 }; |
| 235 #endif | 239 #endif |
| OLD | NEW |