| 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 fRequiresLocalOutputColorForFBFetch = false; |
| 26 fFlatInterpolationSupport = false; | 27 fFlatInterpolationSupport = false; |
| 27 fNoPerspectiveInterpolationSupport = false; | 28 fNoPerspectiveInterpolationSupport = false; |
| 28 fMultisampleInterpolationSupport = false; | 29 fMultisampleInterpolationSupport = false; |
| 29 fSampleVariablesSupport = false; | 30 fSampleVariablesSupport = false; |
| 30 fSampleMaskOverrideCoverageSupport = false; | 31 fSampleMaskOverrideCoverageSupport = false; |
| 31 fExternalTextureSupport = false; | 32 fExternalTextureSupport = false; |
| 32 fTexelFetchSupport = false; | 33 fTexelFetchSupport = false; |
| 33 fVersionDeclString = nullptr; | 34 fVersionDeclString = nullptr; |
| 34 fShaderDerivativeExtensionString = nullptr; | 35 fShaderDerivativeExtensionString = nullptr; |
| 35 fFragCoordConventionsExtensionString = nullptr; | 36 fFragCoordConventionsExtensionString = nullptr; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 66 r.appendf("--- GLSL-Specific ---\n"); | 67 r.appendf("--- GLSL-Specific ---\n"); |
| 67 | 68 |
| 68 r.appendf("FB Fetch Support: %s\n", (fFBFetchSupport ? "YES" : "NO")); | 69 r.appendf("FB Fetch Support: %s\n", (fFBFetchSupport ? "YES" : "NO")); |
| 69 r.appendf("Drops tile on zero divide: %s\n", (fDropsTileOnZeroDivide ? "YES"
: "NO")); | 70 r.appendf("Drops tile on zero divide: %s\n", (fDropsTileOnZeroDivide ? "YES"
: "NO")); |
| 70 r.appendf("Bindless texture support: %s\n", (fBindlessTextureSupport ? "YES"
: "NO")); | 71 r.appendf("Bindless texture support: %s\n", (fBindlessTextureSupport ? "YES"
: "NO")); |
| 71 r.appendf("Uses precision modifiers: %s\n", (fUsesPrecisionModifiers ? "YES"
: "NO")); | 72 r.appendf("Uses precision modifiers: %s\n", (fUsesPrecisionModifiers ? "YES"
: "NO")); |
| 72 r.appendf("Can use any() function: %s\n", (fCanUseAnyFunctionInShader ? "YES
" : "NO")); | 73 r.appendf("Can use any() function: %s\n", (fCanUseAnyFunctionInShader ? "YES
" : "NO")); |
| 73 r.appendf("Can use min() and abs() together: %s\n", (fCanUseMinAndAbsTogethe
r ? "YES" : "NO")); | 74 r.appendf("Can use min() and abs() together: %s\n", (fCanUseMinAndAbsTogethe
r ? "YES" : "NO")); |
| 74 r.appendf("Must force negated atan param to float: %s\n", (fMustForceNegated
AtanParamToFloat ? | 75 r.appendf("Must force negated atan param to float: %s\n", (fMustForceNegated
AtanParamToFloat ? |
| 75 "YES" : "NO")); | 76 "YES" : "NO")); |
| 77 r.appendf("Must use local out color for FBFetch: %s\n", (fRequiresLocalOutpu
tColorForFBFetch ? |
| 78 "YES" : "NO")); |
| 76 r.appendf("Flat interpolation support: %s\n", (fFlatInterpolationSupport ?
"YES" : "NO")); | 79 r.appendf("Flat interpolation support: %s\n", (fFlatInterpolationSupport ?
"YES" : "NO")); |
| 77 r.appendf("No perspective interpolation support: %s\n", (fNoPerspectiveInter
polationSupport ? | 80 r.appendf("No perspective interpolation support: %s\n", (fNoPerspectiveInter
polationSupport ? |
| 78 "YES" : "NO")); | 81 "YES" : "NO")); |
| 79 r.appendf("Multisample interpolation support: %s\n", (fMultisampleInterpolat
ionSupport ? | 82 r.appendf("Multisample interpolation support: %s\n", (fMultisampleInterpolat
ionSupport ? |
| 80 "YES" : "NO")); | 83 "YES" : "NO")); |
| 81 r.appendf("Sample variables support: %s\n", (fSampleVariablesSupport ? "YES"
: "NO")); | 84 r.appendf("Sample variables support: %s\n", (fSampleVariablesSupport ? "YES"
: "NO")); |
| 82 r.appendf("Sample mask override coverage support: %s\n", (fSampleMaskOverrid
eCoverageSupport ? | 85 r.appendf("Sample mask override coverage support: %s\n", (fSampleMaskOverrid
eCoverageSupport ? |
| 83 "YES" : "NO")); | 86 "YES" : "NO")); |
| 84 r.appendf("External texture support: %s\n", (fExternalTextureSupport ? "YES"
: "NO")); | 87 r.appendf("External texture support: %s\n", (fExternalTextureSupport ? "YES"
: "NO")); |
| 85 r.appendf("texelFetch support: %s\n", (fTexelFetchSupport ? "YES" : "NO")); | 88 r.appendf("texelFetch support: %s\n", (fTexelFetchSupport ? "YES" : "NO")); |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 table[kRGBA_float_GrPixelConfig] = kHigh_GrSLPrecision; | 145 table[kRGBA_float_GrPixelConfig] = kHigh_GrSLPrecision; |
| 143 table[kAlpha_half_GrPixelConfig] = mediump; | 146 table[kAlpha_half_GrPixelConfig] = mediump; |
| 144 table[kRGBA_half_GrPixelConfig] = mediump; | 147 table[kRGBA_half_GrPixelConfig] = mediump; |
| 145 | 148 |
| 146 GR_STATIC_ASSERT(16 == kGrPixelConfigCnt); | 149 GR_STATIC_ASSERT(16 == kGrPixelConfigCnt); |
| 147 } | 150 } |
| 148 } | 151 } |
| 149 | 152 |
| 150 void GrGLSLCaps::onApplyOptionsOverrides(const GrContextOptions& options) { | 153 void GrGLSLCaps::onApplyOptionsOverrides(const GrContextOptions& options) { |
| 151 } | 154 } |
| OLD | NEW |