Chromium Code Reviews| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 60 * Instead the texture is multisampled when bound to the FBO and then re solved automatically | 60 * Instead the texture is multisampled when bound to the FBO and then re solved automatically |
| 61 * when read. It also defines an alternate value for GL_MAX_SAMPLES (whi ch we call | 61 * when read. It also defines an alternate value for GL_MAX_SAMPLES (whi ch we call |
| 62 * GR_GL_MAX_SAMPLES_IMG). | 62 * GR_GL_MAX_SAMPLES_IMG). |
| 63 */ | 63 */ |
| 64 kES_IMG_MsToTexture_MSFBOType, | 64 kES_IMG_MsToTexture_MSFBOType, |
| 65 /** | 65 /** |
| 66 * GL_EXT_multisampled_render_to_texture. Same as the IMG one above but uses the standard | 66 * GL_EXT_multisampled_render_to_texture. Same as the IMG one above but uses the standard |
| 67 * GL_MAX_SAMPLES value. | 67 * GL_MAX_SAMPLES value. |
| 68 */ | 68 */ |
| 69 kES_EXT_MsToTexture_MSFBOType, | 69 kES_EXT_MsToTexture_MSFBOType, |
| 70 /** | |
| 71 * GL_NV_framebuffer_mixed_samples. | |
| 72 */ | |
| 73 kMixedSamples_MSFBOType, | |
| 70 | 74 |
| 71 kLast_MSFBOType = kES_EXT_MsToTexture_MSFBOType | 75 kLast_MSFBOType = kMixedSamples_MSFBOType |
| 72 }; | 76 }; |
| 73 | 77 |
| 74 enum InvalidateFBType { | 78 enum InvalidateFBType { |
| 75 kNone_InvalidateFBType, | 79 kNone_InvalidateFBType, |
| 76 kDiscard_InvalidateFBType, //<! glDiscardFramebuffer() | 80 kDiscard_InvalidateFBType, //<! glDiscardFramebuffer() |
| 77 kInvalidate_InvalidateFBType, //<! glInvalidateFramebuffer() | 81 kInvalidate_InvalidateFBType, //<! glInvalidateFramebuffer() |
| 78 | 82 |
| 79 kLast_InvalidateFBType = kInvalidate_InvalidateFBType | 83 kLast_InvalidateFBType = kInvalidate_InvalidateFBType |
| 80 }; | 84 }; |
| 81 | 85 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 134 * Reports the type of MSAA FBO support. | 138 * Reports the type of MSAA FBO support. |
| 135 */ | 139 */ |
| 136 MSFBOType msFBOType() const { return fMSFBOType; } | 140 MSFBOType msFBOType() const { return fMSFBOType; } |
| 137 | 141 |
| 138 /** | 142 /** |
| 139 * Does the supported MSAA FBO extension have MSAA renderbuffers? | 143 * Does the supported MSAA FBO extension have MSAA renderbuffers? |
| 140 */ | 144 */ |
| 141 bool usesMSAARenderBuffers() const { | 145 bool usesMSAARenderBuffers() const { |
| 142 return kNone_MSFBOType != fMSFBOType && | 146 return kNone_MSFBOType != fMSFBOType && |
| 143 kES_IMG_MsToTexture_MSFBOType != fMSFBOType && | 147 kES_IMG_MsToTexture_MSFBOType != fMSFBOType && |
| 144 kES_EXT_MsToTexture_MSFBOType != fMSFBOType; | 148 kES_EXT_MsToTexture_MSFBOType != fMSFBOType && |
| 149 kMixedSamples_MSFBOType != fMSFBOType; | |
| 145 } | 150 } |
| 146 | 151 |
| 147 /** | 152 /** |
| 148 * Is the MSAA FBO extension one where the texture is multisampled when boun d to an FBO and | 153 * Is the MSAA FBO extension one where the texture is multisampled when boun d to an FBO and |
| 149 * then implicitly resolved when read. | 154 * then implicitly resolved when read. |
| 150 */ | 155 */ |
| 151 bool usesImplicitMSAAResolve() const { | 156 bool usesImplicitMSAAResolve() const { |
| 152 return kES_IMG_MsToTexture_MSFBOType == fMSFBOType || | 157 return kES_IMG_MsToTexture_MSFBOType == fMSFBOType || |
| 153 kES_EXT_MsToTexture_MSFBOType == fMSFBOType; | 158 kES_EXT_MsToTexture_MSFBOType == fMSFBOType; |
| 154 } | 159 } |
| 155 | 160 |
| 156 bool fbMixedSamplesSupport() const { return fFBMixedSamplesSupport; } | |
| 157 | |
| 158 InvalidateFBType invalidateFBType() const { return fInvalidateFBType; } | 161 InvalidateFBType invalidateFBType() const { return fInvalidateFBType; } |
| 159 | 162 |
| 160 /// What type of buffer mapping is supported? | 163 /// What type of buffer mapping is supported? |
| 161 MapBufferType mapBufferType() const { return fMapBufferType; } | 164 MapBufferType mapBufferType() const { return fMapBufferType; } |
| 162 | 165 |
| 163 /** | 166 /** |
| 164 * Gets an array of legal stencil formats. These formats are not guaranteed | 167 * Gets an array of legal stencil formats. These formats are not guaranteed |
| 165 * to be supported by the driver but are legal GLenum names given the GL | 168 * to be supported by the driver but are legal GLenum names given the GL |
| 166 * version and extensions supported. | 169 * version and extensions supported. |
| 167 */ | 170 */ |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 342 bool fTextureRedSupport : 1; | 345 bool fTextureRedSupport : 1; |
| 343 bool fImagingSupport : 1; | 346 bool fImagingSupport : 1; |
| 344 bool fTwoFormatLimit : 1; | 347 bool fTwoFormatLimit : 1; |
| 345 bool fFragCoordsConventionSupport : 1; | 348 bool fFragCoordsConventionSupport : 1; |
| 346 bool fVertexArrayObjectSupport : 1; | 349 bool fVertexArrayObjectSupport : 1; |
| 347 bool fES2CompatibilitySupport : 1; | 350 bool fES2CompatibilitySupport : 1; |
| 348 bool fMultisampleDisableSupport : 1; | 351 bool fMultisampleDisableSupport : 1; |
| 349 bool fUseNonVBOVertexAndIndexDynamicData : 1; | 352 bool fUseNonVBOVertexAndIndexDynamicData : 1; |
| 350 bool fIsCoreProfile : 1; | 353 bool fIsCoreProfile : 1; |
| 351 bool fFullClearIsFree : 1; | 354 bool fFullClearIsFree : 1; |
| 352 bool fFBMixedSamplesSupport : 1; | |
|
Chris Dalton
2015/06/09 17:39:51
Oops, thanks for catching that. I shouldn't have m
| |
| 353 | 355 |
| 354 struct ReadPixelsSupportedFormat { | 356 struct ReadPixelsSupportedFormat { |
| 355 GrGLenum fFormat; | 357 GrGLenum fFormat; |
| 356 GrGLenum fType; | 358 GrGLenum fType; |
| 357 GrGLenum fFboFormat; | 359 GrGLenum fFboFormat; |
| 358 | 360 |
| 359 bool operator==(const ReadPixelsSupportedFormat& rhs) const { | 361 bool operator==(const ReadPixelsSupportedFormat& rhs) const { |
| 360 return fFormat == rhs.fFormat | 362 return fFormat == rhs.fFormat |
| 361 && fType == rhs.fType | 363 && fType == rhs.fType |
| 362 && fFboFormat == rhs.fFboFormat; | 364 && fFboFormat == rhs.fFboFormat; |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 442 const char* fFBFetchColorName; | 444 const char* fFBFetchColorName; |
| 443 const char* fFBFetchExtensionString; | 445 const char* fFBFetchExtensionString; |
| 444 | 446 |
| 445 AdvBlendEqInteraction fAdvBlendEqInteraction; | 447 AdvBlendEqInteraction fAdvBlendEqInteraction; |
| 446 | 448 |
| 447 typedef GrShaderCaps INHERITED; | 449 typedef GrShaderCaps INHERITED; |
| 448 }; | 450 }; |
| 449 | 451 |
| 450 | 452 |
| 451 #endif | 453 #endif |
| OLD | NEW |