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

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

Issue 1722363002: Add cap and builder feature for multisample interpolation (Closed) Base URL: https://skia.googlesource.com/skia.git@upload_samplelocations
Patch Set: simplify Created 4 years, 9 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 2012 Google Inc. 2 * Copyright 2012 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 8
9 #ifndef GrGLSLCaps_DEFINED 9 #ifndef GrGLSLCaps_DEFINED
10 #define GrGLSLCaps_DEFINED 10 #define GrGLSLCaps_DEFINED
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 const char* fbFetchColorName() const { return fFBFetchColorName; } 51 const char* fbFetchColorName() const { return fFBFetchColorName; }
52 52
53 const char* fbFetchExtensionString() const { return fFBFetchExtensionString; } 53 const char* fbFetchExtensionString() const { return fFBFetchExtensionString; }
54 54
55 bool dropsTileOnZeroDivide() const { return fDropsTileOnZeroDivide; } 55 bool dropsTileOnZeroDivide() const { return fDropsTileOnZeroDivide; }
56 56
57 bool flatInterpolationSupport() const { return fFlatInterpolationSupport; } 57 bool flatInterpolationSupport() const { return fFlatInterpolationSupport; }
58 58
59 bool noperspectiveInterpolationSupport() const { return fNoPerspectiveInterp olationSupport; } 59 bool noperspectiveInterpolationSupport() const { return fNoPerspectiveInterp olationSupport; }
60 60
61 bool multisampleInterpolationSupport() const { return fMultisampleInterpolat ionSupport; }
62
61 bool sampleVariablesSupport() const { return fSampleVariablesSupport; } 63 bool sampleVariablesSupport() const { return fSampleVariablesSupport; }
62 64
63 bool sampleMaskOverrideCoverageSupport() const { return fSampleMaskOverrideC overageSupport; } 65 bool sampleMaskOverrideCoverageSupport() const { return fSampleMaskOverrideC overageSupport; }
64 66
65 AdvBlendEqInteraction advBlendEqInteraction() const { return fAdvBlendEqInte raction; } 67 AdvBlendEqInteraction advBlendEqInteraction() const { return fAdvBlendEqInte raction; }
66 68
67 bool mustEnableAdvBlendEqs() const { 69 bool mustEnableAdvBlendEqs() const {
68 return fAdvBlendEqInteraction >= kGeneralEnable_AdvBlendEqInteraction; 70 return fAdvBlendEqInteraction >= kGeneralEnable_AdvBlendEqInteraction;
69 } 71 }
70 72
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 113
112 const char* externalTextureExtensionString() const { 114 const char* externalTextureExtensionString() const {
113 return fExternalTextureExtensionString; 115 return fExternalTextureExtensionString;
114 } 116 }
115 117
116 const char* noperspectiveInterpolationExtensionString() const { 118 const char* noperspectiveInterpolationExtensionString() const {
117 SkASSERT(this->noperspectiveInterpolationSupport()); 119 SkASSERT(this->noperspectiveInterpolationSupport());
118 return fNoPerspectiveInterpolationExtensionString; 120 return fNoPerspectiveInterpolationExtensionString;
119 } 121 }
120 122
123 const char* multisampleInterpolationExtensionString() const {
124 SkASSERT(this->multisampleInterpolationSupport());
125 return fMultisampleInterpolationExtensionString;
126 }
127
121 const char* sampleVariablesExtensionString() const { 128 const char* sampleVariablesExtensionString() const {
122 SkASSERT(this->sampleVariablesSupport()); 129 SkASSERT(this->sampleVariablesSupport());
123 return fSampleVariablesExtensionString; 130 return fSampleVariablesExtensionString;
124 } 131 }
125 132
126 /** 133 /**
127 * Given a texture's config, this determines what swizzle must be appended t o accesses to the 134 * Given a texture's config, this determines what swizzle must be appended t o accesses to the
128 * texture in generated shader code. Swizzling may be implemented in texture parameters or a 135 * texture in generated shader code. Swizzling may be implemented in texture parameters or a
129 * sampler rather than in the shader. In this case the returned swizzle will always be "rgba". 136 * sampler rather than in the shader. In this case the returned swizzle will always be "rgba".
130 */ 137 */
(...skipping 19 matching lines...) Expand all
150 GrGLSLGeneration fGLSLGeneration; 157 GrGLSLGeneration fGLSLGeneration;
151 158
152 bool fDropsTileOnZeroDivide : 1; 159 bool fDropsTileOnZeroDivide : 1;
153 bool fFBFetchSupport : 1; 160 bool fFBFetchSupport : 1;
154 bool fFBFetchNeedsCustomOutput : 1; 161 bool fFBFetchNeedsCustomOutput : 1;
155 bool fBindlessTextureSupport : 1; 162 bool fBindlessTextureSupport : 1;
156 bool fUsesPrecisionModifiers : 1; 163 bool fUsesPrecisionModifiers : 1;
157 bool fCanUseAnyFunctionInShader : 1; 164 bool fCanUseAnyFunctionInShader : 1;
158 bool fFlatInterpolationSupport : 1; 165 bool fFlatInterpolationSupport : 1;
159 bool fNoPerspectiveInterpolationSupport : 1; 166 bool fNoPerspectiveInterpolationSupport : 1;
167 bool fMultisampleInterpolationSupport : 1;
160 bool fSampleVariablesSupport : 1; 168 bool fSampleVariablesSupport : 1;
161 bool fSampleMaskOverrideCoverageSupport : 1; 169 bool fSampleMaskOverrideCoverageSupport : 1;
162 170
163 // Used for specific driver bug work arounds 171 // Used for specific driver bug work arounds
164 bool fCanUseMinAndAbsTogether : 1; 172 bool fCanUseMinAndAbsTogether : 1;
165 bool fMustForceNegatedAtanParamToFloat : 1; 173 bool fMustForceNegatedAtanParamToFloat : 1;
166 174
167 const char* fVersionDeclString; 175 const char* fVersionDeclString;
168 176
169 const char* fShaderDerivativeExtensionString; 177 const char* fShaderDerivativeExtensionString;
170 const char* fFragCoordConventionsExtensionString; 178 const char* fFragCoordConventionsExtensionString;
171 const char* fSecondaryOutputExtensionString; 179 const char* fSecondaryOutputExtensionString;
172 const char* fExternalTextureExtensionString; 180 const char* fExternalTextureExtensionString;
173 const char* fNoPerspectiveInterpolationExtensionString; 181 const char* fNoPerspectiveInterpolationExtensionString;
182 const char* fMultisampleInterpolationExtensionString;
174 const char* fSampleVariablesExtensionString; 183 const char* fSampleVariablesExtensionString;
175 184
176 const char* fFBFetchColorName; 185 const char* fFBFetchColorName;
177 const char* fFBFetchExtensionString; 186 const char* fFBFetchExtensionString;
178 187
179 AdvBlendEqInteraction fAdvBlendEqInteraction; 188 AdvBlendEqInteraction fAdvBlendEqInteraction;
180 189
181 GrSwizzle fConfigTextureSwizzle[kGrPixelConfigCnt]; 190 GrSwizzle fConfigTextureSwizzle[kGrPixelConfigCnt];
182 GrSwizzle fConfigOutputSwizzle[kGrPixelConfigCnt]; 191 GrSwizzle fConfigOutputSwizzle[kGrPixelConfigCnt];
183 192
184 friend class GrGLCaps; // For initialization. 193 friend class GrGLCaps; // For initialization.
185 friend class GrVkCaps; 194 friend class GrVkCaps;
186 195
187 typedef GrShaderCaps INHERITED; 196 typedef GrShaderCaps INHERITED;
188 }; 197 };
189 198
190 #endif 199 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698