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

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

Issue 1870893002: Implement texel buffers (Closed) Base URL: https://skia.googlesource.com/skia.git@upload_texelfetch
Patch Set: GrBuffer(Access) into include/gpu Created 4 years, 8 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/gl/GrGLBuffer.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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 return SkToBool(fConfigTable[config].fFlags & ConfigInfo::kRenderabl eWithMSAA_Flag); 128 return SkToBool(fConfigTable[config].fFlags & ConfigInfo::kRenderabl eWithMSAA_Flag);
129 } else { 129 } else {
130 return SkToBool(fConfigTable[config].fFlags & ConfigInfo::kRenderabl e_Flag); 130 return SkToBool(fConfigTable[config].fFlags & ConfigInfo::kRenderabl e_Flag);
131 } 131 }
132 } 132 }
133 133
134 bool isConfigTexSupportEnabled(GrPixelConfig config) const { 134 bool isConfigTexSupportEnabled(GrPixelConfig config) const {
135 return SkToBool(fConfigTable[config].fFlags & ConfigInfo::kCanUseTexStor age_Flag); 135 return SkToBool(fConfigTable[config].fFlags & ConfigInfo::kCanUseTexStor age_Flag);
136 } 136 }
137 137
138 bool canUseConfigWithTexelBuffer(GrPixelConfig config) const {
139 return SkToBool(fConfigTable[config].fFlags & ConfigInfo::kCanUseWithTex elBuffer_Flag);
140 }
141
138 /** Returns the mapping between GrPixelConfig components and GL internal for mat components. */ 142 /** Returns the mapping between GrPixelConfig components and GL internal for mat components. */
139 const GrSwizzle& configSwizzle(GrPixelConfig config) const { 143 const GrSwizzle& configSwizzle(GrPixelConfig config) const {
140 return fConfigTable[config].fSwizzle; 144 return fConfigTable[config].fSwizzle;
141 } 145 }
142 146
147 GrGLenum configSizedInternalFormat(GrPixelConfig config) const {
148 return fConfigTable[config].fFormats.fSizedInternalFormat;
149 }
150
143 bool getTexImageFormats(GrPixelConfig surfaceConfig, GrPixelConfig externalC onfig, 151 bool getTexImageFormats(GrPixelConfig surfaceConfig, GrPixelConfig externalC onfig,
144 GrGLenum* internalFormat, GrGLenum* externalFormat, 152 GrGLenum* internalFormat, GrGLenum* externalFormat,
145 GrGLenum* externalType) const; 153 GrGLenum* externalType) const;
146 154
147 bool getCompressedTexImageFormats(GrPixelConfig surfaceConfig, GrGLenum* int ernalFormat) const; 155 bool getCompressedTexImageFormats(GrPixelConfig surfaceConfig, GrGLenum* int ernalFormat) const;
148 156
149 bool getReadPixelsFormat(GrPixelConfig surfaceConfig, GrPixelConfig external Config, 157 bool getReadPixelsFormat(GrPixelConfig surfaceConfig, GrPixelConfig external Config,
150 GrGLenum* externalFormat, GrGLenum* externalType) c onst; 158 GrGLenum* externalFormat, GrGLenum* externalType) c onst;
151 159
152 bool getRenderbufferFormat(GrPixelConfig config, GrGLenum* internalFormat) c onst; 160 bool getRenderbufferFormat(GrPixelConfig config, GrGLenum* internalFormat) c onst;
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 469
462 // Index fStencilFormats. 470 // Index fStencilFormats.
463 int fStencilFormatIndex; 471 int fStencilFormatIndex;
464 472
465 enum { 473 enum {
466 kVerifiedColorAttachment_Flag = 0x1, 474 kVerifiedColorAttachment_Flag = 0x1,
467 kTextureable_Flag = 0x2, 475 kTextureable_Flag = 0x2,
468 kRenderable_Flag = 0x4, 476 kRenderable_Flag = 0x4,
469 kRenderableWithMSAA_Flag = 0x8, 477 kRenderableWithMSAA_Flag = 0x8,
470 kCanUseTexStorage_Flag = 0x10, 478 kCanUseTexStorage_Flag = 0x10,
479 kCanUseWithTexelBuffer_Flag = 0x20,
471 }; 480 };
472 uint32_t fFlags; 481 uint32_t fFlags;
473 482
474 GrSwizzle fSwizzle; 483 GrSwizzle fSwizzle;
475 }; 484 };
476 485
477 ConfigInfo fConfigTable[kGrPixelConfigCnt]; 486 ConfigInfo fConfigTable[kGrPixelConfigCnt];
478 487
479 typedef GrCaps INHERITED; 488 typedef GrCaps INHERITED;
480 }; 489 };
481 490
482 #endif 491 #endif
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLBuffer.cpp ('k') | src/gpu/gl/GrGLCaps.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698