| OLD | NEW |
| 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 fCanUseMinAndAbsTogether = true; | 24 fCanUseMinAndAbsTogether = true; |
| 25 fMustForceNegatedAtanParamToFloat = false; | 25 fMustForceNegatedAtanParamToFloat = false; |
| 26 fSampleVariablesSupport = false; | |
| 27 fSampleMaskOverrideCoverageSupport = false; | |
| 28 fFlatInterpolationSupport = false; | 26 fFlatInterpolationSupport = false; |
| 29 fNoPerspectiveInterpolationSupport = false; | 27 fNoPerspectiveInterpolationSupport = false; |
| 30 fVersionDeclString = nullptr; | 28 fVersionDeclString = nullptr; |
| 31 fShaderDerivativeExtensionString = nullptr; | 29 fShaderDerivativeExtensionString = nullptr; |
| 32 fSampleVariablesExtensionString = nullptr; | |
| 33 fFragCoordConventionsExtensionString = nullptr; | 30 fFragCoordConventionsExtensionString = nullptr; |
| 34 fSecondaryOutputExtensionString = nullptr; | 31 fSecondaryOutputExtensionString = nullptr; |
| 35 fExternalTextureExtensionString = nullptr; | 32 fExternalTextureExtensionString = nullptr; |
| 36 fNoPerspectiveInterpolationExtensionString = nullptr; | 33 fNoPerspectiveInterpolationExtensionString = nullptr; |
| 37 fFBFetchColorName = nullptr; | 34 fFBFetchColorName = nullptr; |
| 38 fFBFetchExtensionString = nullptr; | 35 fFBFetchExtensionString = nullptr; |
| 39 fAdvBlendEqInteraction = kNotSupported_AdvBlendEqInteraction; | 36 fAdvBlendEqInteraction = kNotSupported_AdvBlendEqInteraction; |
| 40 } | 37 } |
| 41 | 38 |
| 42 SkString GrGLSLCaps::dump() const { | 39 SkString GrGLSLCaps::dump() const { |
| (...skipping 14 matching lines...) Expand all Loading... |
| 57 r.appendf("--- GLSL-Specific ---\n"); | 54 r.appendf("--- GLSL-Specific ---\n"); |
| 58 | 55 |
| 59 r.appendf("FB Fetch Support: %s\n", (fFBFetchSupport ? "YES" : "NO")); | 56 r.appendf("FB Fetch Support: %s\n", (fFBFetchSupport ? "YES" : "NO")); |
| 60 r.appendf("Drops tile on zero divide: %s\n", (fDropsTileOnZeroDivide ? "YES"
: "NO")); | 57 r.appendf("Drops tile on zero divide: %s\n", (fDropsTileOnZeroDivide ? "YES"
: "NO")); |
| 61 r.appendf("Bindless texture support: %s\n", (fBindlessTextureSupport ? "YES"
: "NO")); | 58 r.appendf("Bindless texture support: %s\n", (fBindlessTextureSupport ? "YES"
: "NO")); |
| 62 r.appendf("Uses precision modifiers: %s\n", (fUsesPrecisionModifiers ? "YES"
: "NO")); | 59 r.appendf("Uses precision modifiers: %s\n", (fUsesPrecisionModifiers ? "YES"
: "NO")); |
| 63 r.appendf("Can use any() function: %s\n", (fCanUseAnyFunctionInShader ? "YES
" : "NO")); | 60 r.appendf("Can use any() function: %s\n", (fCanUseAnyFunctionInShader ? "YES
" : "NO")); |
| 64 r.appendf("Can use min() and abs() together: %s\n", (fCanUseMinAndAbsTogethe
r ? "YES" : "NO")); | 61 r.appendf("Can use min() and abs() together: %s\n", (fCanUseMinAndAbsTogethe
r ? "YES" : "NO")); |
| 65 r.appendf("Must force negated atan param to float: %s\n", (fMustForceNegated
AtanParamToFloat ? | 62 r.appendf("Must force negated atan param to float: %s\n", (fMustForceNegated
AtanParamToFloat ? |
| 66 "YES" : "NO")); | 63 "YES" : "NO")); |
| 67 r.appendf("Sample variables support: %s\n", (fSampleVariablesSupport ? "YES"
: "NO")); | |
| 68 r.appendf("Sample mask override coverage support: %s\n", (fSampleMaskOverrid
eCoverageSupport ? | |
| 69 "YES" : "NO")); | |
| 70 r.appendf("Flat interpolation support: %s\n", (fFlatInterpolationSupport ?
"YES" : "NO")); | 64 r.appendf("Flat interpolation support: %s\n", (fFlatInterpolationSupport ?
"YES" : "NO")); |
| 71 r.appendf("No perspective interpolation support: %s\n", (fNoPerspectiveInter
polationSupport ? | 65 r.appendf("No perspective interpolation support: %s\n", (fNoPerspectiveInter
polationSupport ? |
| 72 "YES" : "NO")); | 66 "YES" : "NO")); |
| 73 r.appendf("Advanced blend equation interaction: %s\n", | 67 r.appendf("Advanced blend equation interaction: %s\n", |
| 74 kAdvBlendEqInteractionStr[fAdvBlendEqInteraction]); | 68 kAdvBlendEqInteractionStr[fAdvBlendEqInteraction]); |
| 75 return r; | 69 return r; |
| 76 } | 70 } |
| 77 | 71 |
| 78 void GrGLSLCaps::onApplyOptionsOverrides(const GrContextOptions& options) { | 72 void GrGLSLCaps::onApplyOptionsOverrides(const GrContextOptions& options) { |
| 79 } | 73 } |
| 80 | 74 |
| OLD | NEW |