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

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

Issue 1407063011: Revert of Fix mixed samples stencil clip (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 1 month 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/GrClipMaskManager.h » ('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"
11 11
12 GrShaderCaps::GrShaderCaps() { 12 GrShaderCaps::GrShaderCaps() {
13 fShaderDerivativeSupport = false; 13 fShaderDerivativeSupport = false;
14 fGeometryShaderSupport = false; 14 fGeometryShaderSupport = false;
15 fPathRenderingSupport = false; 15 fPathRenderingSupport = false;
16 fDstReadInShaderSupport = false; 16 fDstReadInShaderSupport = false;
17 fDualSourceBlendingSupport = false; 17 fDualSourceBlendingSupport = false;
18 fProgrammableSampleLocationsSupport = false;
18 fShaderPrecisionVaries = false; 19 fShaderPrecisionVaries = false;
19 } 20 }
20 21
21 static const char* shader_type_to_string(GrShaderType type) { 22 static const char* shader_type_to_string(GrShaderType type) {
22 switch (type) { 23 switch (type) {
23 case kVertex_GrShaderType: 24 case kVertex_GrShaderType:
24 return "vertex"; 25 return "vertex";
25 case kGeometry_GrShaderType: 26 case kGeometry_GrShaderType:
26 return "geometry"; 27 return "geometry";
27 case kFragment_GrShaderType: 28 case kFragment_GrShaderType:
(...skipping 15 matching lines...) Expand all
43 } 44 }
44 45
45 SkString GrShaderCaps::dump() const { 46 SkString GrShaderCaps::dump() const {
46 SkString r; 47 SkString r;
47 static const char* gNY[] = { "NO", "YES" }; 48 static const char* gNY[] = { "NO", "YES" };
48 r.appendf("Shader Derivative Support : %s\n", gNY[fShaderDerivat iveSupport]); 49 r.appendf("Shader Derivative Support : %s\n", gNY[fShaderDerivat iveSupport]);
49 r.appendf("Geometry Shader Support : %s\n", gNY[fGeometryShade rSupport]); 50 r.appendf("Geometry Shader Support : %s\n", gNY[fGeometryShade rSupport]);
50 r.appendf("Path Rendering Support : %s\n", gNY[fPathRendering Support]); 51 r.appendf("Path Rendering Support : %s\n", gNY[fPathRendering Support]);
51 r.appendf("Dst Read In Shader Support : %s\n", gNY[fDstReadInShad erSupport]); 52 r.appendf("Dst Read In Shader Support : %s\n", gNY[fDstReadInShad erSupport]);
52 r.appendf("Dual Source Blending Support : %s\n", gNY[fDualSourceBle ndingSupport]); 53 r.appendf("Dual Source Blending Support : %s\n", gNY[fDualSourceBle ndingSupport]);
54 r.appendf("Programmable Sample Locations Support : %s\n", gNY[fProgrammableS ampleLocationsSupport]);
53 55
54 r.appendf("Shader Float Precisions (varies: %s) :\n", gNY[fShaderPrecisionV aries]); 56 r.appendf("Shader Float Precisions (varies: %s) :\n", gNY[fShaderPrecisionV aries]);
55 57
56 for (int s = 0; s < kGrShaderTypeCount; ++s) { 58 for (int s = 0; s < kGrShaderTypeCount; ++s) {
57 GrShaderType shaderType = static_cast<GrShaderType>(s); 59 GrShaderType shaderType = static_cast<GrShaderType>(s);
58 r.appendf("\t%s:\n", shader_type_to_string(shaderType)); 60 r.appendf("\t%s:\n", shader_type_to_string(shaderType));
59 for (int p = 0; p < kGrSLPrecisionCount; ++p) { 61 for (int p = 0; p < kGrSLPrecisionCount; ++p) {
60 if (fFloatPrecisions[s][p].supported()) { 62 if (fFloatPrecisions[s][p].supported()) {
61 GrSLPrecision precision = static_cast<GrSLPrecision>(p); 63 GrSLPrecision precision = static_cast<GrSLPrecision>(p);
62 r.appendf("\t\t%s: log_low: %d log_high: %d bits: %d\n", 64 r.appendf("\t\t%s: log_low: %d log_high: %d bits: %d\n",
(...skipping 20 matching lines...) Expand all
83 fNPOTTextureTileSupport = false; 85 fNPOTTextureTileSupport = false;
84 fTwoSidedStencilSupport = false; 86 fTwoSidedStencilSupport = false;
85 fStencilWrapOpsSupport = false; 87 fStencilWrapOpsSupport = false;
86 fDiscardRenderTargetSupport = false; 88 fDiscardRenderTargetSupport = false;
87 fReuseScratchTextures = true; 89 fReuseScratchTextures = true;
88 fReuseScratchBuffers = true; 90 fReuseScratchBuffers = true;
89 fGpuTracingSupport = false; 91 fGpuTracingSupport = false;
90 fCompressedTexSubImageSupport = false; 92 fCompressedTexSubImageSupport = false;
91 fOversizedStencilSupport = false; 93 fOversizedStencilSupport = false;
92 fTextureBarrierSupport = false; 94 fTextureBarrierSupport = false;
93 fMultisampleDisableSupport = false;
94 fProgrammableSampleLocationsSupport = false;
95 fMixedSamplesSupport = false; 95 fMixedSamplesSupport = false;
96 fSupportsInstancedDraws = false; 96 fSupportsInstancedDraws = false;
97 fFullClearIsFree = false; 97 fFullClearIsFree = false;
98 fMustClearUploadedBufferData = false; 98 fMustClearUploadedBufferData = false;
99 99
100 fUseDrawInsteadOfClear = false; 100 fUseDrawInsteadOfClear = false;
101 101
102 fBlendEquationSupport = kBasic_BlendEquationSupport; 102 fBlendEquationSupport = kBasic_BlendEquationSupport;
103 fAdvBlendEqBlacklist = 0; 103 fAdvBlendEqBlacklist = 0;
104 104
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 r.appendf("NPOT Texture Tile Support : %s\n", gNY[fNPOTTextureTileS upport]); 157 r.appendf("NPOT Texture Tile Support : %s\n", gNY[fNPOTTextureTileS upport]);
158 r.appendf("Two Sided Stencil Support : %s\n", gNY[fTwoSidedStencilS upport]); 158 r.appendf("Two Sided Stencil Support : %s\n", gNY[fTwoSidedStencilS upport]);
159 r.appendf("Stencil Wrap Ops Support : %s\n", gNY[fStencilWrapOpsSu pport]); 159 r.appendf("Stencil Wrap Ops Support : %s\n", gNY[fStencilWrapOpsSu pport]);
160 r.appendf("Discard Render Target Support : %s\n", gNY[fDiscardRenderTar getSupport]); 160 r.appendf("Discard Render Target Support : %s\n", gNY[fDiscardRenderTar getSupport]);
161 r.appendf("Reuse Scratch Textures : %s\n", gNY[fReuseScratchText ures]); 161 r.appendf("Reuse Scratch Textures : %s\n", gNY[fReuseScratchText ures]);
162 r.appendf("Reuse Scratch Buffers : %s\n", gNY[fReuseScratchBuff ers]); 162 r.appendf("Reuse Scratch Buffers : %s\n", gNY[fReuseScratchBuff ers]);
163 r.appendf("Gpu Tracing Support : %s\n", gNY[fGpuTracingSuppor t]); 163 r.appendf("Gpu Tracing Support : %s\n", gNY[fGpuTracingSuppor t]);
164 r.appendf("Compressed Update Support : %s\n", gNY[fCompressedTexSub ImageSupport]); 164 r.appendf("Compressed Update Support : %s\n", gNY[fCompressedTexSub ImageSupport]);
165 r.appendf("Oversized Stencil Support : %s\n", gNY[fOversizedStencil Support]); 165 r.appendf("Oversized Stencil Support : %s\n", gNY[fOversizedStencil Support]);
166 r.appendf("Texture Barrier Support : %s\n", gNY[fTextureBarrierSu pport]); 166 r.appendf("Texture Barrier Support : %s\n", gNY[fTextureBarrierSu pport]);
167 r.appendf("Multisample Disable Support : %s\n", gNY[fMultisampleDisab leSupport]);
168 r.appendf("Programmable Sample Locations Support : %s\n",
169 gNY[fProgrammableSampleLocationsSupport]);
170 r.appendf("Mixed Samples Support : %s\n", gNY[fMixedSamplesSupp ort]); 167 r.appendf("Mixed Samples Support : %s\n", gNY[fMixedSamplesSupp ort]);
171 r.appendf("Supports instanced draws : %s\n", gNY[fSupportsInstance dDraws]); 168 r.appendf("Supports instanced draws : %s\n", gNY[fSupportsInstance dDraws]);
172 r.appendf("Full screen clear is free : %s\n", gNY[fFullClearIsFree] ); 169 r.appendf("Full screen clear is free : %s\n", gNY[fFullClearIsFree] );
173 r.appendf("Must clear buffer memory : %s\n", gNY[fMustClearUploade dBufferData]); 170 r.appendf("Must clear buffer memory : %s\n", gNY[fMustClearUploade dBufferData]);
174 r.appendf("Draw Instead of Clear [workaround] : %s\n", gNY[fUseDrawInsteadOf Clear]); 171 r.appendf("Draw Instead of Clear [workaround] : %s\n", gNY[fUseDrawInsteadOf Clear]);
175 r.appendf("Draw Instead of TexSubImage [workaround] : %s\n", 172 r.appendf("Draw Instead of TexSubImage [workaround] : %s\n",
176 gNY[fUseDrawInsteadOfPartialRenderTargetWrite]); 173 gNY[fUseDrawInsteadOfPartialRenderTargetWrite]);
177 r.appendf("Prefer VRAM Use over flushes [workaround] : %s\n", gNY[fPreferVRA MUseOverFlushes]); 174 r.appendf("Prefer VRAM Use over flushes [workaround] : %s\n", gNY[fPreferVRA MUseOverFlushes]);
178 175
179 if (this->advancedBlendEquationSupport()) { 176 if (this->advancedBlendEquationSupport()) {
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 SkASSERT(!fConfigTextureSupport[kUnknown_GrPixelConfig]); 243 SkASSERT(!fConfigTextureSupport[kUnknown_GrPixelConfig]);
247 244
248 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) { 245 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) {
249 r.appendf("%s is uploadable to a texture: %s\n", 246 r.appendf("%s is uploadable to a texture: %s\n",
250 kConfigNames[i], 247 kConfigNames[i],
251 gNY[fConfigTextureSupport[i]]); 248 gNY[fConfigTextureSupport[i]]);
252 } 249 }
253 250
254 return r; 251 return r;
255 } 252 }
OLDNEW
« no previous file with comments | « include/gpu/GrCaps.h ('k') | src/gpu/GrClipMaskManager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698