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

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

Issue 1690963003: Add gl_SampleMask functionality to fragment builders (Closed) Base URL: https://skia.googlesource.com/skia.git@upload7_interp
Patch Set: Remove GrGLSLIntMinPrecisionForNBits Created 4 years, 10 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
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 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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698