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

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

Issue 1570173004: This CL adds glTexStorage support. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Adding TODO comment. Created 4 years, 9 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 | « 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 126
127 bool isConfigRenderable(GrPixelConfig config, bool withMSAA) const override { 127 bool isConfigRenderable(GrPixelConfig config, bool withMSAA) const override {
128 SkASSERT(kGrPixelConfigCnt > config); 128 SkASSERT(kGrPixelConfigCnt > config);
129 if (withMSAA) { 129 if (withMSAA) {
130 return SkToBool(fConfigTable[config].fFlags & ConfigInfo::kRenderabl eWithMSAA_Flag); 130 return SkToBool(fConfigTable[config].fFlags & ConfigInfo::kRenderabl eWithMSAA_Flag);
131 } else { 131 } else {
132 return SkToBool(fConfigTable[config].fFlags & ConfigInfo::kRenderabl e_Flag); 132 return SkToBool(fConfigTable[config].fFlags & ConfigInfo::kRenderabl e_Flag);
133 } 133 }
134 } 134 }
135 135
136 bool isConfigTexSupportEnabled(GrPixelConfig config) const {
137 SkASSERT(kGrPixelConfigCnt > config);
138 return SkToBool(fConfigTable[config].fFlags & ConfigInfo::kCanUseTexStor age_Flag);
139 }
140
136 /** Returns the mapping between GrPixelConfig components and GL internal for mat components. */ 141 /** Returns the mapping between GrPixelConfig components and GL internal for mat components. */
137 const GrSwizzle& configSwizzle(GrPixelConfig config) const { 142 const GrSwizzle& configSwizzle(GrPixelConfig config) const {
138 return fConfigTable[config].fSwizzle; 143 return fConfigTable[config].fSwizzle;
139 } 144 }
140 145
141 bool getTexImageFormats(GrPixelConfig surfaceConfig, GrPixelConfig externalC onfig, 146 bool getTexImageFormats(GrPixelConfig surfaceConfig, GrPixelConfig externalC onfig,
142 GrGLenum* internalFormat, GrGLenum* externalFormat, 147 GrGLenum* internalFormat, GrGLenum* externalFormat,
143 GrGLenum* externalType) const; 148 GrGLenum* externalType) const;
144 149
145 bool getCompressedTexImageFormats(GrPixelConfig surfaceConfig, GrGLenum* int ernalFormat) const; 150 bool getCompressedTexImageFormats(GrPixelConfig surfaceConfig, GrGLenum* int ernalFormat) const;
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 272
268 /// Is there support for GL_PACK_ROW_LENGTH 273 /// Is there support for GL_PACK_ROW_LENGTH
269 bool packRowLengthSupport() const { return fPackRowLengthSupport; } 274 bool packRowLengthSupport() const { return fPackRowLengthSupport; }
270 275
271 /// Is there support for GL_PACK_REVERSE_ROW_ORDER 276 /// Is there support for GL_PACK_REVERSE_ROW_ORDER
272 bool packFlipYSupport() const { return fPackFlipYSupport; } 277 bool packFlipYSupport() const { return fPackFlipYSupport; }
273 278
274 /// Is there support for texture parameter GL_TEXTURE_USAGE 279 /// Is there support for texture parameter GL_TEXTURE_USAGE
275 bool textureUsageSupport() const { return fTextureUsageSupport; } 280 bool textureUsageSupport() const { return fTextureUsageSupport; }
276 281
277 /// Is there support for glTexStorage
278 bool texStorageSupport() const { return fTexStorageSupport; }
279
280 /// Is there support for GL_RED and GL_R8 282 /// Is there support for GL_RED and GL_R8
281 bool textureRedSupport() const { return fTextureRedSupport; } 283 bool textureRedSupport() const { return fTextureRedSupport; }
282 284
283 /// Is GL_ARB_IMAGING supported 285 /// Is GL_ARB_IMAGING supported
284 bool imagingSupport() const { return fImagingSupport; } 286 bool imagingSupport() const { return fImagingSupport; }
285 287
286 /// Is there support for Vertex Array Objects? 288 /// Is there support for Vertex Array Objects?
287 bool vertexArrayObjectSupport() const { return fVertexArrayObjectSupport; } 289 bool vertexArrayObjectSupport() const { return fVertexArrayObjectSupport; }
288 290
289 /// Is there support for GL_EXT_direct_state_access? 291 /// Is there support for GL_EXT_direct_state_access?
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 MSFBOType fMSFBOType; 391 MSFBOType fMSFBOType;
390 InvalidateFBType fInvalidateFBType; 392 InvalidateFBType fInvalidateFBType;
391 MapBufferType fMapBufferType; 393 MapBufferType fMapBufferType;
392 TransferBufferType fTransferBufferType; 394 TransferBufferType fTransferBufferType;
393 395
394 bool fUnpackRowLengthSupport : 1; 396 bool fUnpackRowLengthSupport : 1;
395 bool fUnpackFlipYSupport : 1; 397 bool fUnpackFlipYSupport : 1;
396 bool fPackRowLengthSupport : 1; 398 bool fPackRowLengthSupport : 1;
397 bool fPackFlipYSupport : 1; 399 bool fPackFlipYSupport : 1;
398 bool fTextureUsageSupport : 1; 400 bool fTextureUsageSupport : 1;
399 bool fTexStorageSupport : 1;
400 bool fTextureRedSupport : 1; 401 bool fTextureRedSupport : 1;
401 bool fImagingSupport : 1; 402 bool fImagingSupport : 1;
402 bool fVertexArrayObjectSupport : 1; 403 bool fVertexArrayObjectSupport : 1;
403 bool fDirectStateAccessSupport : 1; 404 bool fDirectStateAccessSupport : 1;
404 bool fDebugSupport : 1; 405 bool fDebugSupport : 1;
405 bool fES2CompatibilitySupport : 1; 406 bool fES2CompatibilitySupport : 1;
406 bool fMultisampleDisableSupport : 1; 407 bool fMultisampleDisableSupport : 1;
407 bool fDrawIndirectSupport : 1; 408 bool fDrawIndirectSupport : 1;
408 bool fMultiDrawIndirectSupport : 1; 409 bool fMultiDrawIndirectSupport : 1;
409 bool fBaseInstanceSupport : 1; 410 bool fBaseInstanceSupport : 1;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 }; 476 };
476 477
477 // Index fStencilFormats. 478 // Index fStencilFormats.
478 int fStencilFormatIndex; 479 int fStencilFormatIndex;
479 480
480 enum { 481 enum {
481 kVerifiedColorAttachment_Flag = 0x1, 482 kVerifiedColorAttachment_Flag = 0x1,
482 kTextureable_Flag = 0x2, 483 kTextureable_Flag = 0x2,
483 kRenderable_Flag = 0x4, 484 kRenderable_Flag = 0x4,
484 kRenderableWithMSAA_Flag = 0x8, 485 kRenderableWithMSAA_Flag = 0x8,
486 kCanUseTexStorage_Flag = 0x10,
485 }; 487 };
486 uint32_t fFlags; 488 uint32_t fFlags;
487 489
488 GrSwizzle fSwizzle; 490 GrSwizzle fSwizzle;
489 }; 491 };
490 492
491 ConfigInfo fConfigTable[kGrPixelConfigCnt]; 493 ConfigInfo fConfigTable[kGrPixelConfigCnt];
492 494
493 typedef GrCaps INHERITED; 495 typedef GrCaps INHERITED;
494 }; 496 };
495 497
496 #endif 498 #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