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

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

Issue 1674813004: Revert of Improve GLSL integer support (Closed) Base URL: https://skia.googlesource.com/skia.git@uploat_dratindirect
Patch Set: Created 4 years, 10 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/gl/GrGLInterface.h ('k') | src/gpu/gl/GrGLAssembleInterface.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 fIntegerSupport = false;
19 fShaderPrecisionVaries = false; 18 fShaderPrecisionVaries = false;
20 } 19 }
21 20
22 static const char* shader_type_to_string(GrShaderType type) { 21 static const char* shader_type_to_string(GrShaderType type) {
23 switch (type) { 22 switch (type) {
24 case kVertex_GrShaderType: 23 case kVertex_GrShaderType:
25 return "vertex"; 24 return "vertex";
26 case kGeometry_GrShaderType: 25 case kGeometry_GrShaderType:
27 return "geometry"; 26 return "geometry";
28 case kFragment_GrShaderType: 27 case kFragment_GrShaderType:
(...skipping 15 matching lines...) Expand all
44 } 43 }
45 44
46 SkString GrShaderCaps::dump() const { 45 SkString GrShaderCaps::dump() const {
47 SkString r; 46 SkString r;
48 static const char* gNY[] = { "NO", "YES" }; 47 static const char* gNY[] = { "NO", "YES" };
49 r.appendf("Shader Derivative Support : %s\n", gNY[fShaderDerivative Support]); 48 r.appendf("Shader Derivative Support : %s\n", gNY[fShaderDerivative Support]);
50 r.appendf("Geometry Shader Support : %s\n", gNY[fGeometryShaderSu pport]); 49 r.appendf("Geometry Shader Support : %s\n", gNY[fGeometryShaderSu pport]);
51 r.appendf("Path Rendering Support : %s\n", gNY[fPathRenderingSup port]); 50 r.appendf("Path Rendering Support : %s\n", gNY[fPathRenderingSup port]);
52 r.appendf("Dst Read In Shader Support : %s\n", gNY[fDstReadInShaderS upport]); 51 r.appendf("Dst Read In Shader Support : %s\n", gNY[fDstReadInShaderS upport]);
53 r.appendf("Dual Source Blending Support : %s\n", gNY[fDualSourceBlendi ngSupport]); 52 r.appendf("Dual Source Blending Support : %s\n", gNY[fDualSourceBlendi ngSupport]);
54 r.appendf("Integer Support : %s\n", gNY[fIntegerSupport]) ;
55 53
56 r.appendf("Shader Float Precisions (varies: %s):\n", gNY[fShaderPrecisionVar ies]); 54 r.appendf("Shader Float Precisions (varies: %s):\n", gNY[fShaderPrecisionVar ies]);
57 55
58 for (int s = 0; s < kGrShaderTypeCount; ++s) { 56 for (int s = 0; s < kGrShaderTypeCount; ++s) {
59 GrShaderType shaderType = static_cast<GrShaderType>(s); 57 GrShaderType shaderType = static_cast<GrShaderType>(s);
60 r.appendf("\t%s:\n", shader_type_to_string(shaderType)); 58 r.appendf("\t%s:\n", shader_type_to_string(shaderType));
61 for (int p = 0; p < kGrSLPrecisionCount; ++p) { 59 for (int p = 0; p < kGrSLPrecisionCount; ++p) {
62 if (fFloatPrecisions[s][p].supported()) { 60 if (fFloatPrecisions[s][p].supported()) {
63 GrSLPrecision precision = static_cast<GrSLPrecision>(p); 61 GrSLPrecision precision = static_cast<GrSLPrecision>(p);
64 r.appendf("\t\t%s: log_low: %d log_high: %d bits: %d\n", 62 r.appendf("\t\t%s: log_low: %d log_high: %d bits: %d\n",
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 249
252 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) { 250 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) {
253 GrPixelConfig config = static_cast<GrPixelConfig>(i); 251 GrPixelConfig config = static_cast<GrPixelConfig>(i);
254 r.appendf("%s is uploadable to a texture: %s\n", 252 r.appendf("%s is uploadable to a texture: %s\n",
255 kConfigNames[i], 253 kConfigNames[i],
256 gNY[this->isConfigTexturable(config)]); 254 gNY[this->isConfigTexturable(config)]);
257 } 255 }
258 256
259 return r; 257 return r;
260 } 258 }
OLDNEW
« no previous file with comments | « include/gpu/gl/GrGLInterface.h ('k') | src/gpu/gl/GrGLAssembleInterface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698