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

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

Issue 14091008: Add support for GL_EXT_multisampled_render_to_texture. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 * semantics of how / when a resolve is performed. 49 * semantics of how / when a resolve is performed.
50 */ 50 */
51 enum MSFBOType { 51 enum MSFBOType {
52 /** 52 /**
53 * no support for MSAA FBOs 53 * no support for MSAA FBOs
54 */ 54 */
55 kNone_MSFBOType = 0, 55 kNone_MSFBOType = 0,
56 /** 56 /**
57 * GL3.0-style MSAA FBO (GL_ARB_framebuffer_object) 57 * GL3.0-style MSAA FBO (GL_ARB_framebuffer_object)
58 */ 58 */
59 kDesktopARB_MSFBOType, 59 kDesktop_ARB_MSFBOType,
60 /** 60 /**
61 * earlier GL_EXT_framebuffer* extensions 61 * earlier GL_EXT_framebuffer* extensions
62 */ 62 */
63 kDesktopEXT_MSFBOType, 63 kDesktop_EXT_MSFBOType,
64 /** 64 /**
65 * GL_APPLE_framebuffer_multisample ES extension 65 * GL_APPLE_framebuffer_multisample ES extension
66 */ 66 */
67 kAppleES_MSFBOType, 67 kES_Apple_MSFBOType,
68 /** 68 /**
69 * GL_IMG_multisampled_render_to_texture 69 * GL_IMG_multisampled_render_to_texture. This variation does not have M SAA renderbuffers.
70 * Instead the texture is multisampled when bound to the FBO and then re solved automatically
71 * when read. It also defines an alternate value for GL_MAX_SAMPLES (whi ch we call
72 * GR_GL_MAX_SAMPLES_IMG).
70 */ 73 */
71 kImaginationES_MSFBOType, 74 kES_IMG_MsToTexture_MSFBOType,
75 /**
76 * GL_EXT_multisampled_render_to_texture. Same as the IMG one above but uses the standard
77 * GL_MAX_SAMPLES value.
78 */
79 kES_EXT_MsToTexture_MSFBOType,
72 }; 80 };
73 81
74 enum CoverageAAType { 82 enum CoverageAAType {
75 /** 83 /**
76 * No coverage sample support 84 * No coverage sample support
77 */ 85 */
78 kNone_CoverageAAType, 86 kNone_CoverageAAType,
79 87
80 /** 88 /**
81 * GL_NV_framebuffer_multisample_coverage 89 * GL_NV_framebuffer_multisample_coverage
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 bool isColorConfigAndStencilFormatVerified( 146 bool isColorConfigAndStencilFormatVerified(
139 GrPixelConfig config, 147 GrPixelConfig config,
140 const GrGLStencilBuffer::Format& format) const; 148 const GrGLStencilBuffer::Format& format) const;
141 149
142 /** 150 /**
143 * Reports the type of MSAA FBO support. 151 * Reports the type of MSAA FBO support.
144 */ 152 */
145 MSFBOType msFBOType() const { return fMSFBOType; } 153 MSFBOType msFBOType() const { return fMSFBOType; }
146 154
147 /** 155 /**
156 * Does the supported MSAA FBO extension have MSAA renderbuffers?
157 */
158 bool usesMSAARenderBuffers() const {
159 return kNone_MSFBOType != fMSFBOType &&
160 kES_IMG_MsToTexture_MSFBOType != fMSFBOType &&
161 kES_EXT_MsToTexture_MSFBOType != fMSFBOType;
162 }
163
164 /**
165 * Is the MSAA FBO extension one where the texture is multisampled when boun d to an FBO and
166 * then implicitly resolved when read.
167 */
168 bool usesImplicitMSAAResolve() const {
169 return kES_IMG_MsToTexture_MSFBOType == fMSFBOType ||
170 kES_EXT_MsToTexture_MSFBOType == fMSFBOType;
171 }
172
173 /**
148 * Reports the type of coverage sample AA support. 174 * Reports the type of coverage sample AA support.
149 */ 175 */
150 CoverageAAType coverageAAType() const { return fCoverageAAType; } 176 CoverageAAType coverageAAType() const { return fCoverageAAType; }
151 177
152 /** 178 /**
153 * Chooses a supported coverage mode based on a desired sample count. The 179 * Chooses a supported coverage mode based on a desired sample count. The
154 * desired sample count is rounded up the next supported coverage sample 180 * desired sample count is rounded up the next supported coverage sample
155 * count unless a it is larger than the max in which case it is rounded 181 * count unless a it is larger than the max in which case it is rounded
156 * down. Once a coverage sample count is decided, the supported mode with 182 * down. Once a coverage sample count is decided, the supported mode with
157 * the fewest color samples is chosen. 183 * the fewest color samples is chosen.
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 bool fFragCoordsConventionSupport : 1; 339 bool fFragCoordsConventionSupport : 1;
314 bool fVertexArrayObjectSupport : 1; 340 bool fVertexArrayObjectSupport : 1;
315 bool fUseNonVBOVertexAndIndexDynamicData : 1; 341 bool fUseNonVBOVertexAndIndexDynamicData : 1;
316 bool fIsCoreProfile : 1; 342 bool fIsCoreProfile : 1;
317 bool fDiscardFBSupport : 1; 343 bool fDiscardFBSupport : 1;
318 344
319 typedef GrDrawTargetCaps INHERITED; 345 typedef GrDrawTargetCaps INHERITED;
320 }; 346 };
321 347
322 #endif 348 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/gl/GrGLCaps.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698