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 GrGLCaps_DEFINED | 9 #ifndef GrGLCaps_DEFINED |
10 #define GrGLCaps_DEFINED | 10 #define GrGLCaps_DEFINED |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 | 67 |
68 kLast_MSFBOType = kES_EXT_MsToTexture_MSFBOType | 68 kLast_MSFBOType = kES_EXT_MsToTexture_MSFBOType |
69 }; | 69 }; |
70 | 70 |
71 enum FBFetchType { | 71 enum FBFetchType { |
72 kNone_FBFetchType, | 72 kNone_FBFetchType, |
73 /** GL_EXT_shader_framebuffer_fetch */ | 73 /** GL_EXT_shader_framebuffer_fetch */ |
74 kEXT_FBFetchType, | 74 kEXT_FBFetchType, |
75 /** GL_NV_shader_framebuffer_fetch */ | 75 /** GL_NV_shader_framebuffer_fetch */ |
76 kNV_FBFetchType, | 76 kNV_FBFetchType, |
| 77 /** GL_ARM_shader_framebuffer_fetch */ |
| 78 kARM_FBFetchType, |
77 | 79 |
78 kLast_FBFetchType = kNV_FBFetchType | 80 kLast_FBFetchType = kARM_FBFetchType |
79 }; | 81 }; |
80 | 82 |
81 enum InvalidateFBType { | 83 enum InvalidateFBType { |
82 kNone_InvalidateFBType, | 84 kNone_InvalidateFBType, |
83 kDiscard_InvalidateFBType, //<! glDiscardFramebuffer() | 85 kDiscard_InvalidateFBType, //<! glDiscardFramebuffer() |
84 kInvalidate_InvalidateFBType, //<! glInvalidateFramebuffer() | 86 kInvalidate_InvalidateFBType, //<! glInvalidateFramebuffer() |
85 | 87 |
86 kLast_InvalidateFBType = kInvalidate_InvalidateFBType | 88 kLast_InvalidateFBType = kInvalidate_InvalidateFBType |
87 }; | 89 }; |
88 | 90 |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 | 169 |
168 /** | 170 /** |
169 * Is the MSAA FBO extension one where the texture is multisampled when boun
d to an FBO and | 171 * Is the MSAA FBO extension one where the texture is multisampled when boun
d to an FBO and |
170 * then implicitly resolved when read. | 172 * then implicitly resolved when read. |
171 */ | 173 */ |
172 bool usesImplicitMSAAResolve() const { | 174 bool usesImplicitMSAAResolve() const { |
173 return kES_IMG_MsToTexture_MSFBOType == fMSFBOType || | 175 return kES_IMG_MsToTexture_MSFBOType == fMSFBOType || |
174 kES_EXT_MsToTexture_MSFBOType == fMSFBOType; | 176 kES_EXT_MsToTexture_MSFBOType == fMSFBOType; |
175 } | 177 } |
176 | 178 |
| 179 /** |
| 180 * Some helper functions for encapsulating various extensions to read FB Buf
fer on openglES |
| 181 * |
| 182 * TODO On desktop opengl 4.2+ we can achieve something similar to this effe
ct |
| 183 */ |
177 FBFetchType fbFetchType() const { return fFBFetchType; } | 184 FBFetchType fbFetchType() const { return fFBFetchType; } |
178 | 185 |
| 186 const char* fbFetchColorName() const { return fFBFetchColorName; } |
| 187 |
| 188 const char* fbFetchExtensionString() const { return fFBFetchExtensionString;
} |
| 189 |
179 InvalidateFBType invalidateFBType() const { return fInvalidateFBType; } | 190 InvalidateFBType invalidateFBType() const { return fInvalidateFBType; } |
180 | 191 |
181 /// What type of buffer mapping is supported? | 192 /// What type of buffer mapping is supported? |
182 MapBufferType mapBufferType() const { return fMapBufferType; } | 193 MapBufferType mapBufferType() const { return fMapBufferType; } |
183 | 194 |
184 /** | 195 /** |
185 * Gets an array of legal stencil formats. These formats are not guaranteed | 196 * Gets an array of legal stencil formats. These formats are not guaranteed |
186 * to be supported by the driver but are legal GLenum names given the GL | 197 * to be supported by the driver but are legal GLenum names given the GL |
187 * version and extensions supported. | 198 * version and extensions supported. |
188 */ | 199 */ |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 // as a stencil attachment. | 345 // as a stencil attachment. |
335 SkTArray<VerifiedColorConfigs, true> fStencilVerifiedColorConfigs; | 346 SkTArray<VerifiedColorConfigs, true> fStencilVerifiedColorConfigs; |
336 | 347 |
337 int fMaxFragmentUniformVectors; | 348 int fMaxFragmentUniformVectors; |
338 int fMaxVertexAttributes; | 349 int fMaxVertexAttributes; |
339 int fMaxFragmentTextureUnits; | 350 int fMaxFragmentTextureUnits; |
340 int fMaxFixedFunctionTextureCoords; | 351 int fMaxFixedFunctionTextureCoords; |
341 | 352 |
342 MSFBOType fMSFBOType; | 353 MSFBOType fMSFBOType; |
343 FBFetchType fFBFetchType; | 354 FBFetchType fFBFetchType; |
| 355 const char* fFBFetchColorName; |
| 356 const char* fFBFetchExtensionString; |
344 InvalidateFBType fInvalidateFBType; | 357 InvalidateFBType fInvalidateFBType; |
345 MapBufferType fMapBufferType; | 358 MapBufferType fMapBufferType; |
346 LATCAlias fLATCAlias; | 359 LATCAlias fLATCAlias; |
347 | 360 |
348 bool fRGBA8RenderbufferSupport : 1; | 361 bool fRGBA8RenderbufferSupport : 1; |
349 bool fBGRAIsInternalFormat : 1; | 362 bool fBGRAIsInternalFormat : 1; |
350 bool fTextureSwizzleSupport : 1; | 363 bool fTextureSwizzleSupport : 1; |
351 bool fUnpackRowLengthSupport : 1; | 364 bool fUnpackRowLengthSupport : 1; |
352 bool fUnpackFlipYSupport : 1; | 365 bool fUnpackFlipYSupport : 1; |
353 bool fPackRowLengthSupport : 1; | 366 bool fPackRowLengthSupport : 1; |
354 bool fPackFlipYSupport : 1; | 367 bool fPackFlipYSupport : 1; |
355 bool fTextureUsageSupport : 1; | 368 bool fTextureUsageSupport : 1; |
356 bool fTexStorageSupport : 1; | 369 bool fTexStorageSupport : 1; |
357 bool fTextureRedSupport : 1; | 370 bool fTextureRedSupport : 1; |
358 bool fImagingSupport : 1; | 371 bool fImagingSupport : 1; |
359 bool fTwoFormatLimit : 1; | 372 bool fTwoFormatLimit : 1; |
360 bool fFragCoordsConventionSupport : 1; | 373 bool fFragCoordsConventionSupport : 1; |
361 bool fVertexArrayObjectSupport : 1; | 374 bool fVertexArrayObjectSupport : 1; |
362 bool fUseNonVBOVertexAndIndexDynamicData : 1; | 375 bool fUseNonVBOVertexAndIndexDynamicData : 1; |
363 bool fIsCoreProfile : 1; | 376 bool fIsCoreProfile : 1; |
364 bool fFullClearIsFree : 1; | 377 bool fFullClearIsFree : 1; |
365 bool fDropsTileOnZeroDivide : 1; | 378 bool fDropsTileOnZeroDivide : 1; |
366 | 379 |
367 typedef GrDrawTargetCaps INHERITED; | 380 typedef GrDrawTargetCaps INHERITED; |
368 }; | 381 }; |
369 | 382 |
370 #endif | 383 #endif |
OLD | NEW |