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

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

Issue 1507603004: Merge fix for 552999 to m48(Always use high precision on NDS transform) (Closed) Base URL: https://skia.googlesource.com/skia.git@m48
Patch Set: Created 5 years 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/GrGLCaps.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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 65
66 bool mustDeclareFragmentShaderOutput() const { 66 bool mustDeclareFragmentShaderOutput() const {
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; }
76
77 bool canUseMinAndAbsTogether() const { return fCanUseMinAndAbsTogether; } 75 bool canUseMinAndAbsTogether() const { return fCanUseMinAndAbsTogether; }
78 76
79 bool mustForceNegatedAtanParamToFloat() const { return fMustForceNegatedAtan ParamToFloat; } 77 bool mustForceNegatedAtanParamToFloat() const { return fMustForceNegatedAtan ParamToFloat; }
80 78
81 // Returns the string of an extension that must be enabled in the shader to support 79 // Returns the string of an extension that must be enabled in the shader to support
82 // derivatives. If nullptr is returned then no extension needs to be enabled . Before calling 80 // derivatives. If nullptr is returned then no extension needs to be enabled . Before calling
83 // this function, the caller should check that shaderDerivativeSupport exist s. 81 // this function, the caller should check that shaderDerivativeSupport exist s.
84 const char* shaderDerivativeExtensionString() const { 82 const char* shaderDerivativeExtensionString() const {
85 SkASSERT(this->shaderDerivativeSupport()); 83 SkASSERT(this->shaderDerivativeSupport());
86 return fShaderDerivativeExtensionString; 84 return fShaderDerivativeExtensionString;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 void onApplyOptionsOverrides(const GrContextOptions& options) override; 120 void onApplyOptionsOverrides(const GrContextOptions& options) override;
123 121
124 GrGLSLGeneration fGLSLGeneration; 122 GrGLSLGeneration fGLSLGeneration;
125 123
126 bool fDropsTileOnZeroDivide : 1; 124 bool fDropsTileOnZeroDivide : 1;
127 bool fFBFetchSupport : 1; 125 bool fFBFetchSupport : 1;
128 bool fFBFetchNeedsCustomOutput : 1; 126 bool fFBFetchNeedsCustomOutput : 1;
129 bool fBindlessTextureSupport : 1; 127 bool fBindlessTextureSupport : 1;
130 bool fUsesPrecisionModifiers : 1; 128 bool fUsesPrecisionModifiers : 1;
131 bool fCanUseAnyFunctionInShader : 1; 129 bool fCanUseAnyFunctionInShader : 1;
132 bool fForceHighPrecisionNDSTransform : 1;
133 130
134 // Used for specific driver bug work arounds 131 // Used for specific driver bug work arounds
135 bool fCanUseMinAndAbsTogether : 1; 132 bool fCanUseMinAndAbsTogether : 1;
136 bool fMustForceNegatedAtanParamToFloat : 1; 133 bool fMustForceNegatedAtanParamToFloat : 1;
137 134
138 const char* fVersionDeclString; 135 const char* fVersionDeclString;
139 136
140 const char* fShaderDerivativeExtensionString; 137 const char* fShaderDerivativeExtensionString;
141 const char* fFragCoordConventionsExtensionString; 138 const char* fFragCoordConventionsExtensionString;
142 const char* fSecondaryOutputExtensionString; 139 const char* fSecondaryOutputExtensionString;
143 140
144 const char* fFBFetchColorName; 141 const char* fFBFetchColorName;
145 const char* fFBFetchExtensionString; 142 const char* fFBFetchExtensionString;
146 143
147 AdvBlendEqInteraction fAdvBlendEqInteraction; 144 AdvBlendEqInteraction fAdvBlendEqInteraction;
148 145
149 bool fMustSwizzleInShader; 146 bool fMustSwizzleInShader;
150 const char* fConfigSwizzle[kGrPixelConfigCnt]; 147 const char* fConfigSwizzle[kGrPixelConfigCnt];
151 148
152 friend class GrGLCaps; // For initialization. 149 friend class GrGLCaps; // For initialization.
153 150
154 typedef GrShaderCaps INHERITED; 151 typedef GrShaderCaps INHERITED;
155 }; 152 };
156 153
157 154
158 #endif 155 #endif
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLCaps.cpp ('k') | src/gpu/glsl/GrGLSLCaps.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698