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

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

Issue 1431433003: Move shader compiling to ProgramBuilder and various ShaderBuilder cleanups. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: nits 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 return fGLSLGeneration > k110_GrGLSLGeneration; 67 return fGLSLGeneration > k110_GrGLSLGeneration;
68 } 68 }
69 69
70 bool usesPrecisionModifiers() const { return fUsesPrecisionModifiers; } 70 bool usesPrecisionModifiers() const { return fUsesPrecisionModifiers; }
71 71
72 // Returns whether we can use the glsl funciton any() in our shader code. 72 // Returns whether we can use the glsl funciton any() in our shader code.
73 bool canUseAnyFunctionInShader() const { return fCanUseAnyFunctionInShader; } 73 bool canUseAnyFunctionInShader() const { return fCanUseAnyFunctionInShader; }
74 74
75 bool forceHighPrecisionNDSTransform() const { return fForceHighPrecisionNDST ransform; } 75 bool forceHighPrecisionNDSTransform() const { return fForceHighPrecisionNDST ransform; }
76 76
77 // Returns the string of an extension that must be enabled in the shader to support
78 // derivatives. If nullptr is returned then no extension needs to be enabled . Before calling
79 // this function, the caller should check that shaderDerivativeSupport exist s.
80 const char* shaderDerivativeExtensionString() const {
81 SkASSERT(this->shaderDerivativeSupport());
82 return fShaderDerivativeExtensionString;
83 }
84
77 GrGLSLGeneration generation() const { return fGLSLGeneration; } 85 GrGLSLGeneration generation() const { return fGLSLGeneration; }
78 86
79 /** 87 /**
80 * Returns a string containing the caps info. 88 * Returns a string containing the caps info.
81 */ 89 */
82 SkString dump() const override; 90 SkString dump() const override;
83 91
84 private: 92 private:
85 GrGLSLGeneration fGLSLGeneration; 93 GrGLSLGeneration fGLSLGeneration;
86 94
87 bool fDropsTileOnZeroDivide : 1; 95 bool fDropsTileOnZeroDivide : 1;
88 bool fFBFetchSupport : 1; 96 bool fFBFetchSupport : 1;
89 bool fFBFetchNeedsCustomOutput : 1; 97 bool fFBFetchNeedsCustomOutput : 1;
90 bool fBindlessTextureSupport : 1; 98 bool fBindlessTextureSupport : 1;
91 bool fUsesPrecisionModifiers : 1; 99 bool fUsesPrecisionModifiers : 1;
92 bool fCanUseAnyFunctionInShader : 1; 100 bool fCanUseAnyFunctionInShader : 1;
93 bool fForceHighPrecisionNDSTransform : 1; 101 bool fForceHighPrecisionNDSTransform : 1;
94 102
95 const char* fVersionDeclString; 103 const char* fVersionDeclString;
96 104
105 const char* fShaderDerivativeExtensionString;
106
97 const char* fFBFetchColorName; 107 const char* fFBFetchColorName;
98 const char* fFBFetchExtensionString; 108 const char* fFBFetchExtensionString;
99 109
100 AdvBlendEqInteraction fAdvBlendEqInteraction; 110 AdvBlendEqInteraction fAdvBlendEqInteraction;
101 111
102 friend class GrGLCaps; // For initialization. 112 friend class GrGLCaps; // For initialization.
103 113
104 typedef GrShaderCaps INHERITED; 114 typedef GrShaderCaps INHERITED;
105 }; 115 };
106 116
107 117
108 #endif 118 #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