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

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

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/glsl/GrGLSLCaps.h ('k') | src/gpu/glsl/GrGLSLVertexShaderBuilder.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 #include "GrGLSLCaps.h" 9 #include "GrGLSLCaps.h"
10 10
11 #include "GrContextOptions.h" 11 #include "GrContextOptions.h"
12 12
13 //////////////////////////////////////////////////////////////////////////////// //////////// 13 //////////////////////////////////////////////////////////////////////////////// ////////////
14 14
15 GrGLSLCaps::GrGLSLCaps(const GrContextOptions& options) { 15 GrGLSLCaps::GrGLSLCaps(const GrContextOptions& options) {
16 fGLSLGeneration = k330_GrGLSLGeneration; 16 fGLSLGeneration = k330_GrGLSLGeneration;
17 17
18 fDropsTileOnZeroDivide = false; 18 fDropsTileOnZeroDivide = false;
19 fFBFetchSupport = false; 19 fFBFetchSupport = false;
20 fFBFetchNeedsCustomOutput = false; 20 fFBFetchNeedsCustomOutput = false;
21 fBindlessTextureSupport = false; 21 fBindlessTextureSupport = false;
22 fUsesPrecisionModifiers = false; 22 fUsesPrecisionModifiers = false;
23 fCanUseAnyFunctionInShader = true; 23 fCanUseAnyFunctionInShader = true;
24 fForceHighPrecisionNDSTransform = false;
25 fCanUseMinAndAbsTogether = true; 24 fCanUseMinAndAbsTogether = true;
26 fMustForceNegatedAtanParamToFloat = false; 25 fMustForceNegatedAtanParamToFloat = false;
27 fVersionDeclString = nullptr; 26 fVersionDeclString = nullptr;
28 fShaderDerivativeExtensionString = nullptr; 27 fShaderDerivativeExtensionString = nullptr;
29 fFragCoordConventionsExtensionString = nullptr; 28 fFragCoordConventionsExtensionString = nullptr;
30 fSecondaryOutputExtensionString = nullptr; 29 fSecondaryOutputExtensionString = nullptr;
31 fFBFetchColorName = nullptr; 30 fFBFetchColorName = nullptr;
32 fFBFetchExtensionString = nullptr; 31 fFBFetchExtensionString = nullptr;
33 fAdvBlendEqInteraction = kNotSupported_AdvBlendEqInteraction; 32 fAdvBlendEqInteraction = kNotSupported_AdvBlendEqInteraction;
34 33
(...skipping 16 matching lines...) Expand all
51 GR_STATIC_ASSERT(3 == kSpecificEnables_AdvBlendEqInteraction); 50 GR_STATIC_ASSERT(3 == kSpecificEnables_AdvBlendEqInteraction);
52 GR_STATIC_ASSERT(SK_ARRAY_COUNT(kAdvBlendEqInteractionStr) == kLast_AdvBlend EqInteraction + 1); 51 GR_STATIC_ASSERT(SK_ARRAY_COUNT(kAdvBlendEqInteractionStr) == kLast_AdvBlend EqInteraction + 1);
53 52
54 r.appendf("--- GLSL-Specific ---\n"); 53 r.appendf("--- GLSL-Specific ---\n");
55 54
56 r.appendf("FB Fetch Support: %s\n", (fFBFetchSupport ? "YES" : "NO")); 55 r.appendf("FB Fetch Support: %s\n", (fFBFetchSupport ? "YES" : "NO"));
57 r.appendf("Drops tile on zero divide: %s\n", (fDropsTileOnZeroDivide ? "YES" : "NO")); 56 r.appendf("Drops tile on zero divide: %s\n", (fDropsTileOnZeroDivide ? "YES" : "NO"));
58 r.appendf("Bindless texture support: %s\n", (fBindlessTextureSupport ? "YES" : "NO")); 57 r.appendf("Bindless texture support: %s\n", (fBindlessTextureSupport ? "YES" : "NO"));
59 r.appendf("Uses precision modifiers: %s\n", (fUsesPrecisionModifiers ? "YES" : "NO")); 58 r.appendf("Uses precision modifiers: %s\n", (fUsesPrecisionModifiers ? "YES" : "NO"));
60 r.appendf("Can use any() function: %s\n", (fCanUseAnyFunctionInShader ? "YES " : "NO")); 59 r.appendf("Can use any() function: %s\n", (fCanUseAnyFunctionInShader ? "YES " : "NO"));
61 r.appendf("Force high precision on NDS transform: %s\n", (fForceHighPrecisio nNDSTransform ?
62 "YES" : "NO"));
63 r.appendf("Can use min() and abs() together: %s\n", (fCanUseMinAndAbsTogethe r ? "YES" : "NO")); 60 r.appendf("Can use min() and abs() together: %s\n", (fCanUseMinAndAbsTogethe r ? "YES" : "NO"));
64 r.appendf("Must force negated atan param to float: %s\n", (fMustForceNegated AtanParamToFloat ? 61 r.appendf("Must force negated atan param to float: %s\n", (fMustForceNegated AtanParamToFloat ?
65 "YES" : "NO")); 62 "YES" : "NO"));
66 r.appendf("Advanced blend equation interaction: %s\n", 63 r.appendf("Advanced blend equation interaction: %s\n",
67 kAdvBlendEqInteractionStr[fAdvBlendEqInteraction]); 64 kAdvBlendEqInteractionStr[fAdvBlendEqInteraction]);
68 return r; 65 return r;
69 } 66 }
70 67
71 void GrGLSLCaps::onApplyOptionsOverrides(const GrContextOptions& options) { 68 void GrGLSLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {
72 if (options.fUseShaderSwizzling) { 69 if (options.fUseShaderSwizzling) {
73 fMustSwizzleInShader = true; 70 fMustSwizzleInShader = true;
74 } 71 }
75 } 72 }
76 73
OLDNEW
« no previous file with comments | « src/gpu/glsl/GrGLSLCaps.h ('k') | src/gpu/glsl/GrGLSLVertexShaderBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698