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

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

Issue 1414373002: Move shader precision modifier check onto GLSLCaps (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 years, 2 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 | « src/gpu/gl/builders/GrGLShaderBuilder.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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 } 58 }
59 59
60 bool mustEnableSpecificAdvBlendEqs() const { 60 bool mustEnableSpecificAdvBlendEqs() const {
61 return fAdvBlendEqInteraction == kSpecificEnables_AdvBlendEqInteraction; 61 return fAdvBlendEqInteraction == kSpecificEnables_AdvBlendEqInteraction;
62 } 62 }
63 63
64 bool mustDeclareFragmentShaderOutput() const { 64 bool mustDeclareFragmentShaderOutput() const {
65 return fGLSLGeneration > k110_GrGLSLGeneration; 65 return fGLSLGeneration > k110_GrGLSLGeneration;
66 } 66 }
67 67
68 bool usesPrecisionModifiers() const { return fUsesPrecisionModifiers; }
69
68 GrGLSLGeneration generation() const { return fGLSLGeneration; } 70 GrGLSLGeneration generation() const { return fGLSLGeneration; }
69 71
70 /** 72 /**
71 * Returns a string containing the caps info. 73 * Returns a string containing the caps info.
72 */ 74 */
73 SkString dump() const override; 75 SkString dump() const override;
74 76
75 private: 77 private:
76 GrGLSLGeneration fGLSLGeneration; 78 GrGLSLGeneration fGLSLGeneration;
77 79
78 bool fDropsTileOnZeroDivide : 1; 80 bool fDropsTileOnZeroDivide : 1;
79 bool fFBFetchSupport : 1; 81 bool fFBFetchSupport : 1;
80 bool fFBFetchNeedsCustomOutput : 1; 82 bool fFBFetchNeedsCustomOutput : 1;
81 bool fBindlessTextureSupport : 1; 83 bool fBindlessTextureSupport : 1;
84 bool fUsesPrecisionModifiers : 1;
85
82 86
83 const char* fFBFetchColorName; 87 const char* fFBFetchColorName;
84 const char* fFBFetchExtensionString; 88 const char* fFBFetchExtensionString;
85 89
86 AdvBlendEqInteraction fAdvBlendEqInteraction; 90 AdvBlendEqInteraction fAdvBlendEqInteraction;
87 91
88 friend class GrGLCaps; // For initialization. 92 friend class GrGLCaps; // For initialization.
89 93
90 typedef GrShaderCaps INHERITED; 94 typedef GrShaderCaps INHERITED;
91 }; 95 };
92 96
93 97
94 #endif 98 #endif
OLDNEW
« no previous file with comments | « src/gpu/gl/builders/GrGLShaderBuilder.cpp ('k') | src/gpu/glsl/GrGLSLCaps.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698