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

Side by Side Diff: src/gpu/gl/GrGLCaps.h

Issue 1001503002: Implement support for mixed sampled render targets (Closed) Base URL: https://skia.googlesource.com/skia.git@mix1
Patch Set: Fix build error related to isMultisamped renaming Created 5 years, 6 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
« no previous file with comments | « src/gpu/effects/GrDashingEffect.cpp ('k') | src/gpu/gl/GrGLCaps.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 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
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
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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 /// Is GL_ARB_fragment_coord_conventions supported? 221 /// Is GL_ARB_fragment_coord_conventions supported?
219 bool fragCoordConventionsSupport() const { return fFragCoordsConventionSuppo rt; } 222 bool fragCoordConventionsSupport() const { return fFragCoordsConventionSuppo rt; }
220 223
221 /// Is there support for Vertex Array Objects? 224 /// Is there support for Vertex Array Objects?
222 bool vertexArrayObjectSupport() const { return fVertexArrayObjectSupport; } 225 bool vertexArrayObjectSupport() const { return fVertexArrayObjectSupport; }
223 226
224 /// Is there support for ES2 compatability? 227 /// Is there support for ES2 compatability?
225 bool ES2CompatibilitySupport() const { return fES2CompatibilitySupport; } 228 bool ES2CompatibilitySupport() const { return fES2CompatibilitySupport; }
226 229
227 /// Can we call glDisable(GL_MULTISAMPLE)? 230 /// Can we call glDisable(GL_MULTISAMPLE)?
228 bool multisampleDisableSupport() const { return fMultisampleDisableSupport; } 231 bool multisampleDisableSupport() const {
232 return fMultisampleDisableSupport;
233 }
229 234
230 /// Use indices or vertices in CPU arrays rather than VBOs for dynamic conte nt. 235 /// Use indices or vertices in CPU arrays rather than VBOs for dynamic conte nt.
231 bool useNonVBOVertexAndIndexDynamicData() const { 236 bool useNonVBOVertexAndIndexDynamicData() const {
232 return fUseNonVBOVertexAndIndexDynamicData; 237 return fUseNonVBOVertexAndIndexDynamicData;
233 } 238 }
234 239
235 /// Does ReadPixels support the provided format/type combo? 240 /// Does ReadPixels support the provided format/type combo?
236 bool readPixelsSupported(const GrGLInterface* intf, 241 bool readPixelsSupported(const GrGLInterface* intf,
237 GrGLenum format, 242 GrGLenum format,
238 GrGLenum type, 243 GrGLenum type,
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 bool fTextureRedSupport : 1; 347 bool fTextureRedSupport : 1;
343 bool fImagingSupport : 1; 348 bool fImagingSupport : 1;
344 bool fTwoFormatLimit : 1; 349 bool fTwoFormatLimit : 1;
345 bool fFragCoordsConventionSupport : 1; 350 bool fFragCoordsConventionSupport : 1;
346 bool fVertexArrayObjectSupport : 1; 351 bool fVertexArrayObjectSupport : 1;
347 bool fES2CompatibilitySupport : 1; 352 bool fES2CompatibilitySupport : 1;
348 bool fMultisampleDisableSupport : 1; 353 bool fMultisampleDisableSupport : 1;
349 bool fUseNonVBOVertexAndIndexDynamicData : 1; 354 bool fUseNonVBOVertexAndIndexDynamicData : 1;
350 bool fIsCoreProfile : 1; 355 bool fIsCoreProfile : 1;
351 bool fFullClearIsFree : 1; 356 bool fFullClearIsFree : 1;
352 bool fFBMixedSamplesSupport : 1;
353 357
354 struct ReadPixelsSupportedFormat { 358 struct ReadPixelsSupportedFormat {
355 GrGLenum fFormat; 359 GrGLenum fFormat;
356 GrGLenum fType; 360 GrGLenum fType;
357 GrGLenum fFboFormat; 361 GrGLenum fFboFormat;
358 362
359 bool operator==(const ReadPixelsSupportedFormat& rhs) const { 363 bool operator==(const ReadPixelsSupportedFormat& rhs) const {
360 return fFormat == rhs.fFormat 364 return fFormat == rhs.fFormat
361 && fType == rhs.fType 365 && fType == rhs.fType
362 && fFboFormat == rhs.fFboFormat; 366 && fFboFormat == rhs.fFboFormat;
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 446
443 AdvBlendEqInteraction fAdvBlendEqInteraction; 447 AdvBlendEqInteraction fAdvBlendEqInteraction;
444 448
445 friend class GrGLCaps; // For initialization. 449 friend class GrGLCaps; // For initialization.
446 450
447 typedef GrShaderCaps INHERITED; 451 typedef GrShaderCaps INHERITED;
448 }; 452 };
449 453
450 454
451 #endif 455 #endif
OLDNEW
« no previous file with comments | « src/gpu/effects/GrDashingEffect.cpp ('k') | src/gpu/gl/GrGLCaps.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698