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

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

Issue 1420033002: Revert of Add version string and force highp NDS transfrom to GLSLCaps (Closed) Base URL: https://skia.googlesource.com/skia.git@renameShaderVar
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/gl/builders/GrGLVertexShaderBuilder.cpp ('k') | src/gpu/glsl/GrGLSLCaps.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 * 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 #ifndef GrGLSLCaps_DEFINED 9 #ifndef GrGLSLCaps_DEFINED
10 #define GrGLSLCaps_DEFINED 10 #define GrGLSLCaps_DEFINED
(...skipping 27 matching lines...) Expand all
38 * Some helper functions for encapsulating various extensions to read FB Buf fer on openglES 38 * Some helper functions for encapsulating various extensions to read FB Buf fer on openglES
39 * 39 *
40 * TODO(joshualitt) On desktop opengl 4.2+ we can achieve something similar to this effect 40 * TODO(joshualitt) On desktop opengl 4.2+ we can achieve something similar to this effect
41 */ 41 */
42 bool fbFetchSupport() const { return fFBFetchSupport; } 42 bool fbFetchSupport() const { return fFBFetchSupport; }
43 43
44 bool fbFetchNeedsCustomOutput() const { return fFBFetchNeedsCustomOutput; } 44 bool fbFetchNeedsCustomOutput() const { return fFBFetchNeedsCustomOutput; }
45 45
46 bool bindlessTextureSupport() const { return fBindlessTextureSupport; } 46 bool bindlessTextureSupport() const { return fBindlessTextureSupport; }
47 47
48 const char* versionDeclString() const { return fVersionDeclString; }
49
50 const char* fbFetchColorName() const { return fFBFetchColorName; } 48 const char* fbFetchColorName() const { return fFBFetchColorName; }
51 49
52 const char* fbFetchExtensionString() const { return fFBFetchExtensionString; } 50 const char* fbFetchExtensionString() const { return fFBFetchExtensionString; }
53 51
54 bool dropsTileOnZeroDivide() const { return fDropsTileOnZeroDivide; } 52 bool dropsTileOnZeroDivide() const { return fDropsTileOnZeroDivide; }
55 53
56 AdvBlendEqInteraction advBlendEqInteraction() const { return fAdvBlendEqInte raction; } 54 AdvBlendEqInteraction advBlendEqInteraction() const { return fAdvBlendEqInte raction; }
57 55
58 bool mustEnableAdvBlendEqs() const { 56 bool mustEnableAdvBlendEqs() const {
59 return fAdvBlendEqInteraction >= kGeneralEnable_AdvBlendEqInteraction; 57 return fAdvBlendEqInteraction >= kGeneralEnable_AdvBlendEqInteraction;
60 } 58 }
61 59
62 bool mustEnableSpecificAdvBlendEqs() const { 60 bool mustEnableSpecificAdvBlendEqs() const {
63 return fAdvBlendEqInteraction == kSpecificEnables_AdvBlendEqInteraction; 61 return fAdvBlendEqInteraction == kSpecificEnables_AdvBlendEqInteraction;
64 } 62 }
65 63
66 bool mustDeclareFragmentShaderOutput() const { 64 bool mustDeclareFragmentShaderOutput() const {
67 return fGLSLGeneration > k110_GrGLSLGeneration; 65 return fGLSLGeneration > k110_GrGLSLGeneration;
68 } 66 }
69 67
70 bool usesPrecisionModifiers() const { return fUsesPrecisionModifiers; } 68 bool usesPrecisionModifiers() const { return fUsesPrecisionModifiers; }
71 69
72 // Returns whether we can use the glsl funciton any() in our shader code.
73 bool canUseAnyFunctionInShader() const { return fCanUseAnyFunctionInShader; }
74
75 bool forceHighPrecisionNDSTransform() const { return fForceHighPrecisionNDST ransform; }
76
77 GrGLSLGeneration generation() const { return fGLSLGeneration; } 70 GrGLSLGeneration generation() const { return fGLSLGeneration; }
78 71
79 /** 72 /**
80 * Returns a string containing the caps info. 73 * Returns a string containing the caps info.
81 */ 74 */
82 SkString dump() const override; 75 SkString dump() const override;
83 76
84 private: 77 private:
85 GrGLSLGeneration fGLSLGeneration; 78 GrGLSLGeneration fGLSLGeneration;
86 79
87 bool fDropsTileOnZeroDivide : 1; 80 bool fDropsTileOnZeroDivide : 1;
88 bool fFBFetchSupport : 1; 81 bool fFBFetchSupport : 1;
89 bool fFBFetchNeedsCustomOutput : 1; 82 bool fFBFetchNeedsCustomOutput : 1;
90 bool fBindlessTextureSupport : 1; 83 bool fBindlessTextureSupport : 1;
91 bool fUsesPrecisionModifiers : 1; 84 bool fUsesPrecisionModifiers : 1;
92 bool fCanUseAnyFunctionInShader : 1;
93 bool fForceHighPrecisionNDSTransform : 1;
94 85
95 const char* fVersionDeclString;
96 86
97 const char* fFBFetchColorName; 87 const char* fFBFetchColorName;
98 const char* fFBFetchExtensionString; 88 const char* fFBFetchExtensionString;
99 89
100 AdvBlendEqInteraction fAdvBlendEqInteraction; 90 AdvBlendEqInteraction fAdvBlendEqInteraction;
101 91
102 friend class GrGLCaps; // For initialization. 92 friend class GrGLCaps; // For initialization.
103 93
104 typedef GrShaderCaps INHERITED; 94 typedef GrShaderCaps INHERITED;
105 }; 95 };
106 96
107 97
108 #endif 98 #endif
OLDNEW
« no previous file with comments | « src/gpu/gl/builders/GrGLVertexShaderBuilder.cpp ('k') | src/gpu/glsl/GrGLSLCaps.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698