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

Side by Side Diff: src/gpu/GrCaps.cpp

Issue 1592803002: Differentiate maxColorSamples and maxStencilSamples in GrCaps (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: updates Created 4 years, 11 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 | « include/gpu/GrCaps.h ('k') | src/gpu/GrContext.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 /* 2 /*
3 * Copyright 2015 Google Inc. 3 * Copyright 2015 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "GrCaps.h" 9 #include "GrCaps.h"
10 #include "GrContextOptions.h" 10 #include "GrContextOptions.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 fNPOTTextureTileSupport = false; 83 fNPOTTextureTileSupport = false;
84 fTwoSidedStencilSupport = false; 84 fTwoSidedStencilSupport = false;
85 fStencilWrapOpsSupport = false; 85 fStencilWrapOpsSupport = false;
86 fDiscardRenderTargetSupport = false; 86 fDiscardRenderTargetSupport = false;
87 fReuseScratchTextures = true; 87 fReuseScratchTextures = true;
88 fReuseScratchBuffers = true; 88 fReuseScratchBuffers = true;
89 fGpuTracingSupport = false; 89 fGpuTracingSupport = false;
90 fCompressedTexSubImageSupport = false; 90 fCompressedTexSubImageSupport = false;
91 fOversizedStencilSupport = false; 91 fOversizedStencilSupport = false;
92 fTextureBarrierSupport = false; 92 fTextureBarrierSupport = false;
93 fMixedSamplesSupport = false; 93 fUsesMixedSamples = false;
94 fSupportsInstancedDraws = false; 94 fSupportsInstancedDraws = false;
95 fFullClearIsFree = false; 95 fFullClearIsFree = false;
96 fMustClearUploadedBufferData = false; 96 fMustClearUploadedBufferData = false;
97 97
98 fUseDrawInsteadOfClear = false; 98 fUseDrawInsteadOfClear = false;
99 99
100 fBlendEquationSupport = kBasic_BlendEquationSupport; 100 fBlendEquationSupport = kBasic_BlendEquationSupport;
101 fAdvBlendEqBlacklist = 0; 101 fAdvBlendEqBlacklist = 0;
102 102
103 fMapBufferFlags = kNone_MapFlags; 103 fMapBufferFlags = kNone_MapFlags;
104 104
105 fMaxRenderTargetSize = 1; 105 fMaxRenderTargetSize = 1;
106 fMaxTextureSize = 1; 106 fMaxTextureSize = 1;
107 fMaxSampleCount = 0; 107 fMaxColorSampleCount = 0;
108 fMaxStencilSampleCount = 0;
108 109
109 fSuppressPrints = options.fSuppressPrints; 110 fSuppressPrints = options.fSuppressPrints;
110 fImmediateFlush = options.fImmediateMode; 111 fImmediateFlush = options.fImmediateMode;
111 fDrawPathMasksToCompressedTextureSupport = options.fDrawPathToCompressedText ure; 112 fDrawPathMasksToCompressedTextureSupport = options.fDrawPathToCompressedText ure;
112 fGeometryBufferMapThreshold = options.fGeometryBufferMapThreshold; 113 fGeometryBufferMapThreshold = options.fGeometryBufferMapThreshold;
113 fUseDrawInsteadOfPartialRenderTargetWrite = options.fUseDrawInsteadOfPartial RenderTargetWrite; 114 fUseDrawInsteadOfPartialRenderTargetWrite = options.fUseDrawInsteadOfPartial RenderTargetWrite;
114 115
115 fPreferVRAMUseOverFlushes = true; 116 fPreferVRAMUseOverFlushes = true;
116 } 117 }
117 118
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 r.appendf("NPOT Texture Tile Support : %s\n", gNY[fNPOTTextureTileS upport]); 154 r.appendf("NPOT Texture Tile Support : %s\n", gNY[fNPOTTextureTileS upport]);
154 r.appendf("Two Sided Stencil Support : %s\n", gNY[fTwoSidedStencilS upport]); 155 r.appendf("Two Sided Stencil Support : %s\n", gNY[fTwoSidedStencilS upport]);
155 r.appendf("Stencil Wrap Ops Support : %s\n", gNY[fStencilWrapOpsSu pport]); 156 r.appendf("Stencil Wrap Ops Support : %s\n", gNY[fStencilWrapOpsSu pport]);
156 r.appendf("Discard Render Target Support : %s\n", gNY[fDiscardRenderTar getSupport]); 157 r.appendf("Discard Render Target Support : %s\n", gNY[fDiscardRenderTar getSupport]);
157 r.appendf("Reuse Scratch Textures : %s\n", gNY[fReuseScratchText ures]); 158 r.appendf("Reuse Scratch Textures : %s\n", gNY[fReuseScratchText ures]);
158 r.appendf("Reuse Scratch Buffers : %s\n", gNY[fReuseScratchBuff ers]); 159 r.appendf("Reuse Scratch Buffers : %s\n", gNY[fReuseScratchBuff ers]);
159 r.appendf("Gpu Tracing Support : %s\n", gNY[fGpuTracingSuppor t]); 160 r.appendf("Gpu Tracing Support : %s\n", gNY[fGpuTracingSuppor t]);
160 r.appendf("Compressed Update Support : %s\n", gNY[fCompressedTexSub ImageSupport]); 161 r.appendf("Compressed Update Support : %s\n", gNY[fCompressedTexSub ImageSupport]);
161 r.appendf("Oversized Stencil Support : %s\n", gNY[fOversizedStencil Support]); 162 r.appendf("Oversized Stencil Support : %s\n", gNY[fOversizedStencil Support]);
162 r.appendf("Texture Barrier Support : %s\n", gNY[fTextureBarrierSu pport]); 163 r.appendf("Texture Barrier Support : %s\n", gNY[fTextureBarrierSu pport]);
163 r.appendf("Mixed Samples Support : %s\n", gNY[fMixedSamplesSupp ort]); 164 r.appendf("Uses Mixed Samples : %s\n", gNY[fUsesMixedSamples ]);
164 r.appendf("Supports instanced draws : %s\n", gNY[fSupportsInstance dDraws]); 165 r.appendf("Supports instanced draws : %s\n", gNY[fSupportsInstance dDraws]);
165 r.appendf("Full screen clear is free : %s\n", gNY[fFullClearIsFree] ); 166 r.appendf("Full screen clear is free : %s\n", gNY[fFullClearIsFree] );
166 r.appendf("Must clear buffer memory : %s\n", gNY[fMustClearUploade dBufferData]); 167 r.appendf("Must clear buffer memory : %s\n", gNY[fMustClearUploade dBufferData]);
167 r.appendf("Draw Instead of Clear [workaround] : %s\n", gNY[fUseDrawInsteadOf Clear]); 168 r.appendf("Draw Instead of Clear [workaround] : %s\n", gNY[fUseDrawInsteadOf Clear]);
168 r.appendf("Draw Instead of TexSubImage [workaround] : %s\n", 169 r.appendf("Draw Instead of TexSubImage [workaround] : %s\n",
169 gNY[fUseDrawInsteadOfPartialRenderTargetWrite]); 170 gNY[fUseDrawInsteadOfPartialRenderTargetWrite]);
170 r.appendf("Prefer VRAM Use over flushes [workaround] : %s\n", gNY[fPreferVRA MUseOverFlushes]); 171 r.appendf("Prefer VRAM Use over flushes [workaround] : %s\n", gNY[fPreferVRA MUseOverFlushes]);
171 172
172 if (this->advancedBlendEquationSupport()) { 173 if (this->advancedBlendEquationSupport()) {
173 r.appendf("Advanced Blend Equation Blacklist : 0x%x\n", fAdvBlendEqBlac klist); 174 r.appendf("Advanced Blend Equation Blacklist : 0x%x\n", fAdvBlendEqBlac klist);
174 } 175 }
175 176
176 r.appendf("Max Texture Size : %d\n", fMaxTextureSize); 177 r.appendf("Max Texture Size : %d\n", fMaxTextureSize);
177 r.appendf("Max Render Target Size : %d\n", fMaxRenderTargetSize) ; 178 r.appendf("Max Render Target Size : %d\n", fMaxRenderTargetSize) ;
178 r.appendf("Max Sample Count : %d\n", fMaxSampleCount); 179 r.appendf("Max Color Sample Count : %d\n", fMaxColorSampleCount) ;
180 r.appendf("Max Stencil Sample Count : %d\n", fMaxStencilSampleCoun t);
179 181
180 static const char* kBlendEquationSupportNames[] = { 182 static const char* kBlendEquationSupportNames[] = {
181 "Basic", 183 "Basic",
182 "Advanced", 184 "Advanced",
183 "Advanced Coherent", 185 "Advanced Coherent",
184 }; 186 };
185 GR_STATIC_ASSERT(0 == kBasic_BlendEquationSupport); 187 GR_STATIC_ASSERT(0 == kBasic_BlendEquationSupport);
186 GR_STATIC_ASSERT(1 == kAdvanced_BlendEquationSupport); 188 GR_STATIC_ASSERT(1 == kAdvanced_BlendEquationSupport);
187 GR_STATIC_ASSERT(2 == kAdvancedCoherent_BlendEquationSupport); 189 GR_STATIC_ASSERT(2 == kAdvancedCoherent_BlendEquationSupport);
188 GR_STATIC_ASSERT(SK_ARRAY_COUNT(kBlendEquationSupportNames) == kLast_BlendEq uationSupport + 1); 190 GR_STATIC_ASSERT(SK_ARRAY_COUNT(kBlendEquationSupportNames) == kLast_BlendEq uationSupport + 1);
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 243
242 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) { 244 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) {
243 GrPixelConfig config = static_cast<GrPixelConfig>(i); 245 GrPixelConfig config = static_cast<GrPixelConfig>(i);
244 r.appendf("%s is uploadable to a texture: %s\n", 246 r.appendf("%s is uploadable to a texture: %s\n",
245 kConfigNames[i], 247 kConfigNames[i],
246 gNY[this->isConfigTexturable(config)]); 248 gNY[this->isConfigTexturable(config)]);
247 } 249 }
248 250
249 return r; 251 return r;
250 } 252 }
OLDNEW
« no previous file with comments | « include/gpu/GrCaps.h ('k') | src/gpu/GrContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698