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

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

Issue 1426993007: Revert of Enable stencil clipping in mixed sampled render targets (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/gl/GrGLInterface.h ('k') | src/gpu/GrClipMaskManager.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"
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 fMixedSamplesSupport = false; 18 fMixedSamplesSupport = false;
19 fProgrammableSampleLocationsSupport = false;
20 fShaderPrecisionVaries = false; 19 fShaderPrecisionVaries = false;
21 } 20 }
22 21
23 static const char* shader_type_to_string(GrShaderType type) { 22 static const char* shader_type_to_string(GrShaderType type) {
24 switch (type) { 23 switch (type) {
25 case kVertex_GrShaderType: 24 case kVertex_GrShaderType:
26 return "vertex"; 25 return "vertex";
27 case kGeometry_GrShaderType: 26 case kGeometry_GrShaderType:
28 return "geometry"; 27 return "geometry";
29 case kFragment_GrShaderType: 28 case kFragment_GrShaderType:
(...skipping 10 matching lines...) Expand all
40 return "medium"; 39 return "medium";
41 case kHigh_GrSLPrecision: 40 case kHigh_GrSLPrecision:
42 return "high"; 41 return "high";
43 } 42 }
44 return ""; 43 return "";
45 } 44 }
46 45
47 SkString GrShaderCaps::dump() const { 46 SkString GrShaderCaps::dump() const {
48 SkString r; 47 SkString r;
49 static const char* gNY[] = { "NO", "YES" }; 48 static const char* gNY[] = { "NO", "YES" };
50 r.appendf("Shader Derivative Support : %s\n", gNY[fShaderDerivat iveSupport]); 49 r.appendf("Shader Derivative Support : %s\n", gNY[fShaderDerivative Support]);
51 r.appendf("Geometry Shader Support : %s\n", gNY[fGeometryShade rSupport]); 50 r.appendf("Geometry Shader Support : %s\n", gNY[fGeometryShaderSu pport]);
52 r.appendf("Path Rendering Support : %s\n", gNY[fPathRendering Support]); 51 r.appendf("Path Rendering Support : %s\n", gNY[fPathRenderingSup port]);
53 r.appendf("Dst Read In Shader Support : %s\n", gNY[fDstReadInShad erSupport]); 52 r.appendf("Dst Read In Shader Support : %s\n", gNY[fDstReadInShaderS upport]);
54 r.appendf("Dual Source Blending Support : %s\n", gNY[fDualSourceBle ndingSupport]); 53 r.appendf("Dual Source Blending Support : %s\n", gNY[fDualSourceBlendi ngSupport]);
55 r.appendf("Mixed Samples Support : %s\n", gNY[fMixedSamplesS upport]); 54 r.appendf("Mixed Samples Support : %s\n", gNY[fMixedSamplesSupp ort]);
56 r.appendf("Programmable Sample Locations Support : %s\n", gNY[fProgrammableS ampleLocationsSupport]);
57 55
58 r.appendf("Shader Float Precisions (varies: %s) :\n", gNY[fShaderPrecisionV aries]); 56 r.appendf("Shader Float Precisions (varies: %s):\n", gNY[fShaderPrecisionVar ies]);
59 57
60 for (int s = 0; s < kGrShaderTypeCount; ++s) { 58 for (int s = 0; s < kGrShaderTypeCount; ++s) {
61 GrShaderType shaderType = static_cast<GrShaderType>(s); 59 GrShaderType shaderType = static_cast<GrShaderType>(s);
62 r.appendf("\t%s:\n", shader_type_to_string(shaderType)); 60 r.appendf("\t%s:\n", shader_type_to_string(shaderType));
63 for (int p = 0; p < kGrSLPrecisionCount; ++p) { 61 for (int p = 0; p < kGrSLPrecisionCount; ++p) {
64 if (fFloatPrecisions[s][p].supported()) { 62 if (fFloatPrecisions[s][p].supported()) {
65 GrSLPrecision precision = static_cast<GrSLPrecision>(p); 63 GrSLPrecision precision = static_cast<GrSLPrecision>(p);
66 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",
67 precision_to_string(precision), 65 precision_to_string(precision),
68 fFloatPrecisions[s][p].fLogRangeLow, 66 fFloatPrecisions[s][p].fLogRangeLow,
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 SkASSERT(!fConfigTextureSupport[kUnknown_GrPixelConfig]); 236 SkASSERT(!fConfigTextureSupport[kUnknown_GrPixelConfig]);
239 237
240 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) { 238 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) {
241 r.appendf("%s is uploadable to a texture: %s\n", 239 r.appendf("%s is uploadable to a texture: %s\n",
242 kConfigNames[i], 240 kConfigNames[i],
243 gNY[fConfigTextureSupport[i]]); 241 gNY[fConfigTextureSupport[i]]);
244 } 242 }
245 243
246 return r; 244 return r;
247 } 245 }
OLDNEW
« no previous file with comments | « include/gpu/gl/GrGLInterface.h ('k') | src/gpu/GrClipMaskManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698