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

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

Issue 14875002: Add support for GL_*_shader_framebuffer_fetch (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 | « src/gpu/GrDrawTargetCaps.h ('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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 * Instead the texture is multisampled when bound to the FBO and then re solved automatically 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 71 * when read. It also defines an alternate value for GL_MAX_SAMPLES (whi ch we call
72 * GR_GL_MAX_SAMPLES_IMG). 72 * GR_GL_MAX_SAMPLES_IMG).
73 */ 73 */
74 kES_IMG_MsToTexture_MSFBOType, 74 kES_IMG_MsToTexture_MSFBOType,
75 /** 75 /**
76 * GL_EXT_multisampled_render_to_texture. Same as the IMG one above but uses the standard 76 * GL_EXT_multisampled_render_to_texture. Same as the IMG one above but uses the standard
77 * GL_MAX_SAMPLES value. 77 * GL_MAX_SAMPLES value.
78 */ 78 */
79 kES_EXT_MsToTexture_MSFBOType, 79 kES_EXT_MsToTexture_MSFBOType,
80
81 kLast_MSFBOType = kES_EXT_MsToTexture_MSFBOType
82 };
83
84 enum FBFetchType {
85 kNone_FBFetchType,
86 /** GL_EXT_shader_framebuffer_fetch */
87 kEXT_FBFetchType,
88 /** GL_NV_shader_framebuffer_fetch */
89 kNV_FBFetchType,
90
91 kLast_FBFetchType = kNV_FBFetchType,
80 }; 92 };
81 93
82 enum CoverageAAType { 94 enum CoverageAAType {
83 /** 95 /**
84 * No coverage sample support 96 * No coverage sample support
85 */ 97 */
86 kNone_CoverageAAType, 98 kNone_CoverageAAType,
87 99
88 /** 100 /**
89 * GL_NV_framebuffer_multisample_coverage 101 * GL_NV_framebuffer_multisample_coverage
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 189
178 /** 190 /**
179 * Chooses a supported coverage mode based on a desired sample count. The 191 * Chooses a supported coverage mode based on a desired sample count. The
180 * desired sample count is rounded up the next supported coverage sample 192 * desired sample count is rounded up the next supported coverage sample
181 * count unless a it is larger than the max in which case it is rounded 193 * count unless a it is larger than the max in which case it is rounded
182 * down. Once a coverage sample count is decided, the supported mode with 194 * down. Once a coverage sample count is decided, the supported mode with
183 * the fewest color samples is chosen. 195 * the fewest color samples is chosen.
184 */ 196 */
185 const MSAACoverageMode& getMSAACoverageMode(int desiredSampleCount) const; 197 const MSAACoverageMode& getMSAACoverageMode(int desiredSampleCount) const;
186 198
199 FBFetchType fbFetchType() const { return fFBFetchType; }
200
187 /** 201 /**
188 * Prints the caps info using GrPrintf. 202 * Prints the caps info using GrPrintf.
189 */ 203 */
190 virtual void print() const SK_OVERRIDE; 204 virtual void print() const SK_OVERRIDE;
191 205
192 /** 206 /**
193 * Gets an array of legal stencil formats. These formats are not guaranteed 207 * Gets an array of legal stencil formats. These formats are not guaranteed
194 * to be supported by the driver but are legal GLenum names given the GL 208 * to be supported by the driver but are legal GLenum names given the GL
195 * version and extensions supported. 209 * version and extensions supported.
196 */ 210 */
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 // as a stencil attachment. 330 // as a stencil attachment.
317 SkTArray<VerifiedColorConfigs, true> fStencilVerifiedColorConfigs; 331 SkTArray<VerifiedColorConfigs, true> fStencilVerifiedColorConfigs;
318 332
319 int fMaxFragmentUniformVectors; 333 int fMaxFragmentUniformVectors;
320 int fMaxVertexAttributes; 334 int fMaxVertexAttributes;
321 335
322 MSFBOType fMSFBOType; 336 MSFBOType fMSFBOType;
323 CoverageAAType fCoverageAAType; 337 CoverageAAType fCoverageAAType;
324 SkTDArray<MSAACoverageMode> fMSAACoverageModes; 338 SkTDArray<MSAACoverageMode> fMSAACoverageModes;
325 339
340 FBFetchType fFBFetchType;
341
326 bool fRGBA8RenderbufferSupport : 1; 342 bool fRGBA8RenderbufferSupport : 1;
327 bool fBGRAFormatSupport : 1; 343 bool fBGRAFormatSupport : 1;
328 bool fBGRAIsInternalFormat : 1; 344 bool fBGRAIsInternalFormat : 1;
329 bool fTextureSwizzleSupport : 1; 345 bool fTextureSwizzleSupport : 1;
330 bool fUnpackRowLengthSupport : 1; 346 bool fUnpackRowLengthSupport : 1;
331 bool fUnpackFlipYSupport : 1; 347 bool fUnpackFlipYSupport : 1;
332 bool fPackRowLengthSupport : 1; 348 bool fPackRowLengthSupport : 1;
333 bool fPackFlipYSupport : 1; 349 bool fPackFlipYSupport : 1;
334 bool fTextureUsageSupport : 1; 350 bool fTextureUsageSupport : 1;
335 bool fTexStorageSupport : 1; 351 bool fTexStorageSupport : 1;
336 bool fTextureRedSupport : 1; 352 bool fTextureRedSupport : 1;
337 bool fImagingSupport : 1; 353 bool fImagingSupport : 1;
338 bool fTwoFormatLimit : 1; 354 bool fTwoFormatLimit : 1;
339 bool fFragCoordsConventionSupport : 1; 355 bool fFragCoordsConventionSupport : 1;
340 bool fVertexArrayObjectSupport : 1; 356 bool fVertexArrayObjectSupport : 1;
341 bool fUseNonVBOVertexAndIndexDynamicData : 1; 357 bool fUseNonVBOVertexAndIndexDynamicData : 1;
342 bool fIsCoreProfile : 1; 358 bool fIsCoreProfile : 1;
343 bool fDiscardFBSupport : 1; 359 bool fDiscardFBSupport : 1;
344 360
345 typedef GrDrawTargetCaps INHERITED; 361 typedef GrDrawTargetCaps INHERITED;
346 }; 362 };
347 363
348 #endif 364 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrDrawTargetCaps.h ('k') | src/gpu/gl/GrGLCaps.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698