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

Side by Side Diff: src/gpu/glsl/GrGLSLCaps.cpp

Issue 1420033005: Create swizzle table inside of glsl caps (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 | « src/gpu/glsl/GrGLSLCaps.h ('k') | src/gpu/glsl/GrGLSLTextureSampler.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 * Copyright 2012 Google Inc. 2 * Copyright 2012 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 8
9 #include "GrGLSLCaps.h" 9 #include "GrGLSLCaps.h"
10 10
11 #include "GrContextOptions.h"
12
11 //////////////////////////////////////////////////////////////////////////////// //////////// 13 //////////////////////////////////////////////////////////////////////////////// ////////////
12 14
13 GrGLSLCaps::GrGLSLCaps(const GrContextOptions& options) { 15 GrGLSLCaps::GrGLSLCaps(const GrContextOptions& options) {
14 fGLSLGeneration = k330_GrGLSLGeneration; 16 fGLSLGeneration = k330_GrGLSLGeneration;
15 17
16 fDropsTileOnZeroDivide = false; 18 fDropsTileOnZeroDivide = false;
17 fFBFetchSupport = false; 19 fFBFetchSupport = false;
18 fFBFetchNeedsCustomOutput = false; 20 fFBFetchNeedsCustomOutput = false;
19 fBindlessTextureSupport = false; 21 fBindlessTextureSupport = false;
20 fUsesPrecisionModifiers = false; 22 fUsesPrecisionModifiers = false;
21 fCanUseAnyFunctionInShader = true; 23 fCanUseAnyFunctionInShader = true;
22 fForceHighPrecisionNDSTransform = false; 24 fForceHighPrecisionNDSTransform = false;
23 fVersionDeclString = nullptr; 25 fVersionDeclString = nullptr;
24 fShaderDerivativeExtensionString = nullptr; 26 fShaderDerivativeExtensionString = nullptr;
25 fFBFetchColorName = nullptr; 27 fFBFetchColorName = nullptr;
26 fFBFetchExtensionString = nullptr; 28 fFBFetchExtensionString = nullptr;
27 fAdvBlendEqInteraction = kNotSupported_AdvBlendEqInteraction; 29 fAdvBlendEqInteraction = kNotSupported_AdvBlendEqInteraction;
30
31 fMustSwizzleInShader = false;
32 memset(fConfigSwizzle, 0, sizeof(fConfigSwizzle));
28 } 33 }
29 34
30 SkString GrGLSLCaps::dump() const { 35 SkString GrGLSLCaps::dump() const {
31 SkString r = INHERITED::dump(); 36 SkString r = INHERITED::dump();
32 37
33 static const char* kAdvBlendEqInteractionStr[] = { 38 static const char* kAdvBlendEqInteractionStr[] = {
34 "Not Supported", 39 "Not Supported",
35 "Automatic", 40 "Automatic",
36 "General Enable", 41 "General Enable",
37 "Specific Enables", 42 "Specific Enables",
(...skipping 11 matching lines...) Expand all
49 r.appendf("Bindless texture support: %s\n", (fBindlessTextureSupport ? "YES" : "NO")); 54 r.appendf("Bindless texture support: %s\n", (fBindlessTextureSupport ? "YES" : "NO"));
50 r.appendf("Uses precision modifiers: %s\n", (fUsesPrecisionModifiers ? "YES" : "NO")); 55 r.appendf("Uses precision modifiers: %s\n", (fUsesPrecisionModifiers ? "YES" : "NO"));
51 r.appendf("Can Use any() function: %s\n", (fCanUseAnyFunctionInShader ? "YES " : "NO")); 56 r.appendf("Can Use any() function: %s\n", (fCanUseAnyFunctionInShader ? "YES " : "NO"));
52 r.appendf("Force high precision on NDS transform: %s\n", (fForceHighPrecisio nNDSTransform ? 57 r.appendf("Force high precision on NDS transform: %s\n", (fForceHighPrecisio nNDSTransform ?
53 "YES" : "NO")); 58 "YES" : "NO"));
54 r.appendf("Advanced blend equation interaction: %s\n", 59 r.appendf("Advanced blend equation interaction: %s\n",
55 kAdvBlendEqInteractionStr[fAdvBlendEqInteraction]); 60 kAdvBlendEqInteractionStr[fAdvBlendEqInteraction]);
56 return r; 61 return r;
57 } 62 }
58 63
64 void GrGLSLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {
65 if (options.fUseShaderSwizzling) {
66 fMustSwizzleInShader = true;
67 }
68 }
69
OLDNEW
« no previous file with comments | « src/gpu/glsl/GrGLSLCaps.h ('k') | src/gpu/glsl/GrGLSLTextureSampler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698