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

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

Issue 1287193008: Add ANGLE workaround to prefer flushes over VRAM usage (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update comment Created 5 years, 4 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 fMinTextureSize = 0; 107 fMinTextureSize = 0;
108 fMaxSampleCount = 0; 108 fMaxSampleCount = 0;
109 109
110 memset(fConfigRenderSupport, 0, sizeof(fConfigRenderSupport)); 110 memset(fConfigRenderSupport, 0, sizeof(fConfigRenderSupport));
111 memset(fConfigTextureSupport, 0, sizeof(fConfigTextureSupport)); 111 memset(fConfigTextureSupport, 0, sizeof(fConfigTextureSupport));
112 112
113 fSupressPrints = options.fSuppressPrints; 113 fSupressPrints = options.fSuppressPrints;
114 fDrawPathMasksToCompressedTextureSupport = options.fDrawPathToCompressedText ure; 114 fDrawPathMasksToCompressedTextureSupport = options.fDrawPathToCompressedText ure;
115 fGeometryBufferMapThreshold = options.fGeometryBufferMapThreshold; 115 fGeometryBufferMapThreshold = options.fGeometryBufferMapThreshold;
116 fUseDrawInsteadOfPartialRenderTargetWrite = options.fUseDrawInsteadOfPartial RenderTargetWrite; 116 fUseDrawInsteadOfPartialRenderTargetWrite = options.fUseDrawInsteadOfPartial RenderTargetWrite;
117
118 fPreferVRAMUseOverFlushes = true;
bsalomon 2015/08/21 15:41:31 Hmm... our other workarounds are worded the other
robertphillips 2015/08/21 15:47:15 I did it that way at first and found it a bit conf
117 } 119 }
118 120
119 void GrCaps::applyOptionsOverrides(const GrContextOptions& options) { 121 void GrCaps::applyOptionsOverrides(const GrContextOptions& options) {
120 fMaxTextureSize = SkTMin(fMaxTextureSize, options.fMaxTextureSizeOverride); 122 fMaxTextureSize = SkTMin(fMaxTextureSize, options.fMaxTextureSizeOverride);
121 fMinTextureSize = SkTMax(fMinTextureSize, options.fMinTextureSizeOverride); 123 fMinTextureSize = SkTMax(fMinTextureSize, options.fMinTextureSizeOverride);
122 } 124 }
123 125
124 static SkString map_flags_to_string(uint32_t flags) { 126 static SkString map_flags_to_string(uint32_t flags) {
125 SkString str; 127 SkString str;
126 if (GrCaps::kNone_MapFlags == flags) { 128 if (GrCaps::kNone_MapFlags == flags) {
(...skipping 27 matching lines...) Expand all
154 r.appendf("Gpu Tracing Support : %s\n", gNY[fGpuTracingSuppor t]); 156 r.appendf("Gpu Tracing Support : %s\n", gNY[fGpuTracingSuppor t]);
155 r.appendf("Compressed Update Support : %s\n", gNY[fCompressedTexSub ImageSupport]); 157 r.appendf("Compressed Update Support : %s\n", gNY[fCompressedTexSub ImageSupport]);
156 r.appendf("Oversized Stencil Support : %s\n", gNY[fOversizedStencil Support]); 158 r.appendf("Oversized Stencil Support : %s\n", gNY[fOversizedStencil Support]);
157 r.appendf("Texture Barrier Support : %s\n", gNY[fTextureBarrierSu pport]); 159 r.appendf("Texture Barrier Support : %s\n", gNY[fTextureBarrierSu pport]);
158 r.appendf("Supports instanced draws : %s\n", gNY[fSupportsInstance dDraws]); 160 r.appendf("Supports instanced draws : %s\n", gNY[fSupportsInstance dDraws]);
159 r.appendf("Full screen clear is free : %s\n", gNY[fFullClearIsFree] ); 161 r.appendf("Full screen clear is free : %s\n", gNY[fFullClearIsFree] );
160 r.appendf("Must clear buffer memory : %s\n", gNY[fMustClearUploade dBufferData]); 162 r.appendf("Must clear buffer memory : %s\n", gNY[fMustClearUploade dBufferData]);
161 r.appendf("Draw Instead of Clear [workaround] : %s\n", gNY[fUseDrawInsteadOf Clear]); 163 r.appendf("Draw Instead of Clear [workaround] : %s\n", gNY[fUseDrawInsteadOf Clear]);
162 r.appendf("Draw Instead of TexSubImage [workaround] : %s\n", 164 r.appendf("Draw Instead of TexSubImage [workaround] : %s\n",
163 gNY[fUseDrawInsteadOfPartialRenderTargetWrite]); 165 gNY[fUseDrawInsteadOfPartialRenderTargetWrite]);
166 r.appendf("Prefer VRAM Use over flushes [workaround] : %s\n", gNY[fPreferVRA MUseOverFlushes]);
167
164 if (this->advancedBlendEquationSupport()) { 168 if (this->advancedBlendEquationSupport()) {
165 r.appendf("Advanced Blend Equation Blacklist : 0x%x\n", fAdvBlendEqBlac klist); 169 r.appendf("Advanced Blend Equation Blacklist : 0x%x\n", fAdvBlendEqBlac klist);
166 } 170 }
167 171
168 r.appendf("Max Texture Size : %d\n", fMaxTextureSize); 172 r.appendf("Max Texture Size : %d\n", fMaxTextureSize);
169 r.appendf("Min Texture Size : %d\n", fMinTextureSize); 173 r.appendf("Min Texture Size : %d\n", fMinTextureSize);
170 r.appendf("Max Render Target Size : %d\n", fMaxRenderTargetSize) ; 174 r.appendf("Max Render Target Size : %d\n", fMaxRenderTargetSize) ;
171 r.appendf("Max Sample Count : %d\n", fMaxSampleCount); 175 r.appendf("Max Sample Count : %d\n", fMaxSampleCount);
172 176
173 static const char* kBlendEquationSupportNames[] = { 177 static const char* kBlendEquationSupportNames[] = {
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 SkASSERT(!fConfigTextureSupport[kUnknown_GrPixelConfig]); 236 SkASSERT(!fConfigTextureSupport[kUnknown_GrPixelConfig]);
233 237
234 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) { 238 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) {
235 r.appendf("%s is uploadable to a texture: %s\n", 239 r.appendf("%s is uploadable to a texture: %s\n",
236 kConfigNames[i], 240 kConfigNames[i],
237 gNY[fConfigTextureSupport[i]]); 241 gNY[fConfigTextureSupport[i]]);
238 } 242 }
239 243
240 return r; 244 return r;
241 } 245 }
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