OLD | NEW |
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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 } | 95 } |
96 | 96 |
97 // This returns the name of an extension that must be enabled in the shader,
if such a thing is | 97 // This returns the name of an extension that must be enabled in the shader,
if such a thing is |
98 // required in order to use a secondary output in the shader. This returns a
nullptr if no such | 98 // required in order to use a secondary output in the shader. This returns a
nullptr if no such |
99 // extension is required. However, the return value of this function does no
t say whether dual | 99 // extension is required. However, the return value of this function does no
t say whether dual |
100 // source blending is supported. | 100 // source blending is supported. |
101 const char* secondaryOutputExtensionString() const { | 101 const char* secondaryOutputExtensionString() const { |
102 return fSecondaryOutputExtensionString; | 102 return fSecondaryOutputExtensionString; |
103 } | 103 } |
104 | 104 |
| 105 const char* externalTextureExtensionString() const { |
| 106 return fExternalTextureExtensionString; |
| 107 } |
| 108 |
105 bool mustSwizzleInShader() const { return fMustSwizzleInShader; } | 109 bool mustSwizzleInShader() const { return fMustSwizzleInShader; } |
106 | 110 |
107 /** | 111 /** |
108 * Returns a string which represents how to map from an internal GLFormat to
a given | 112 * Returns a string which represents how to map from an internal GLFormat to
a given |
109 * GrPixelConfig. The function mustSwizzleInShader determines whether this s
wizzle is applied | 113 * GrPixelConfig. The function mustSwizzleInShader determines whether this s
wizzle is applied |
110 * in the generated shader code or using sample state in the 3D API. | 114 * in the generated shader code or using sample state in the 3D API. |
111 */ | 115 */ |
112 const char* getSwizzleMap(GrPixelConfig config) const { return fConfigSwizzl
e[config]; } | 116 const char* getSwizzleMap(GrPixelConfig config) const { return fConfigSwizzl
e[config]; } |
113 | 117 |
114 GrGLSLGeneration generation() const { return fGLSLGeneration; } | 118 GrGLSLGeneration generation() const { return fGLSLGeneration; } |
(...skipping 18 matching lines...) Expand all Loading... |
133 | 137 |
134 // Used for specific driver bug work arounds | 138 // Used for specific driver bug work arounds |
135 bool fCanUseMinAndAbsTogether : 1; | 139 bool fCanUseMinAndAbsTogether : 1; |
136 bool fMustForceNegatedAtanParamToFloat : 1; | 140 bool fMustForceNegatedAtanParamToFloat : 1; |
137 | 141 |
138 const char* fVersionDeclString; | 142 const char* fVersionDeclString; |
139 | 143 |
140 const char* fShaderDerivativeExtensionString; | 144 const char* fShaderDerivativeExtensionString; |
141 const char* fFragCoordConventionsExtensionString; | 145 const char* fFragCoordConventionsExtensionString; |
142 const char* fSecondaryOutputExtensionString; | 146 const char* fSecondaryOutputExtensionString; |
| 147 const char* fExternalTextureExtensionString; |
143 | 148 |
144 const char* fFBFetchColorName; | 149 const char* fFBFetchColorName; |
145 const char* fFBFetchExtensionString; | 150 const char* fFBFetchExtensionString; |
146 | 151 |
147 AdvBlendEqInteraction fAdvBlendEqInteraction; | 152 AdvBlendEqInteraction fAdvBlendEqInteraction; |
148 | 153 |
149 bool fMustSwizzleInShader; | 154 bool fMustSwizzleInShader; |
150 const char* fConfigSwizzle[kGrPixelConfigCnt]; | 155 const char* fConfigSwizzle[kGrPixelConfigCnt]; |
151 | 156 |
152 friend class GrGLCaps; // For initialization. | 157 friend class GrGLCaps; // For initialization. |
153 | 158 |
154 typedef GrShaderCaps INHERITED; | 159 typedef GrShaderCaps INHERITED; |
155 }; | 160 }; |
156 | 161 |
157 | 162 |
158 #endif | 163 #endif |
OLD | NEW |