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

Side by Side Diff: src/gpu/glsl/GrGLSLFragmentShaderBuilder.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 GrGLSLFragmentShaderBuilder_DEFINED 8 #ifndef GrGLSLFragmentShaderBuilder_DEFINED
9 #define GrGLSLFragmentShaderBuilder_DEFINED 9 #define GrGLSLFragmentShaderBuilder_DEFINED
10 10
(...skipping 15 matching lines...) Expand all
26 , fHasSecondaryOutput(false) { 26 , fHasSecondaryOutput(false) {
27 fSubstageIndices.push_back(0); 27 fSubstageIndices.push_back(0);
28 } 28 }
29 virtual ~GrGLSLFragmentBuilder() {} 29 virtual ~GrGLSLFragmentBuilder() {}
30 /** 30 /**
31 * Use of these features may require a GLSL extension to be enabled. Shaders may not compile 31 * Use of these features may require a GLSL extension to be enabled. Shaders may not compile
32 * if code is added that uses one of these features without calling enableFe ature() 32 * if code is added that uses one of these features without calling enableFe ature()
33 */ 33 */
34 enum GLSLFeature { 34 enum GLSLFeature {
35 kStandardDerivatives_GLSLFeature = kLastGLSLPrivateFeature + 1, 35 kStandardDerivatives_GLSLFeature = kLastGLSLPrivateFeature + 1,
36 kPixelLocalStorage_GLSLFeature 36 kPixelLocalStorage_GLSLFeature,
37 kSampleVariables_GLSLFeature,
38 kSampleMaskOverrideCoverage_GLSLFeature
37 }; 39 };
38 40
39 /** 41 /**
40 * If the feature is supported then true is returned and any necessary #exte nsion declarations 42 * If the feature is supported then true is returned and any necessary #exte nsion declarations
41 * are added to the shaders. If the feature is not supported then false will be returned. 43 * are added to the shaders. If the feature is not supported then false will be returned.
42 */ 44 */
43 virtual bool enableFeature(GLSLFeature) = 0; 45 virtual bool enableFeature(GLSLFeature) = 0;
44 46
45 /** 47 /**
46 * This returns a variable name to access the 2D, perspective correct versio n of the coords in 48 * This returns a variable name to access the 2D, perspective correct versio n of the coords in
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 bool fHasReadDstColor; 187 bool fHasReadDstColor;
186 bool fHasReadFragmentPosition; 188 bool fHasReadFragmentPosition;
187 189
188 friend class GrGLSLProgramBuilder; 190 friend class GrGLSLProgramBuilder;
189 friend class GrGLProgramBuilder; 191 friend class GrGLProgramBuilder;
190 192
191 typedef GrGLSLXPFragmentBuilder INHERITED; 193 typedef GrGLSLXPFragmentBuilder INHERITED;
192 }; 194 };
193 195
194 #endif 196 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698