diff options
author | egdaniel <egdaniel@google.com> | 2015-10-21 07:14:17 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-10-21 07:14:17 -0700 |
commit | f529439fea003851d986a0573a7e0465754b2a48 (patch) | |
tree | c3bca1ae5cbc5be61322f48a65d3aaafc96bbc00 /src/gpu/glsl | |
parent | 02141734f2f89fa4e89ba804bc06fa80ed0fc316 (diff) |
Move shader precision modifier check onto GLSLCaps
BUG=skia:
Review URL: https://codereview.chromium.org/1414373002
Diffstat (limited to 'src/gpu/glsl')
-rwxr-xr-x | src/gpu/glsl/GrGLSLCaps.cpp | 2 | ||||
-rwxr-xr-x | src/gpu/glsl/GrGLSLCaps.h | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/gpu/glsl/GrGLSLCaps.cpp b/src/gpu/glsl/GrGLSLCaps.cpp index 38105ef1ce..449ceabd76 100755 --- a/src/gpu/glsl/GrGLSLCaps.cpp +++ b/src/gpu/glsl/GrGLSLCaps.cpp @@ -17,6 +17,7 @@ GrGLSLCaps::GrGLSLCaps(const GrContextOptions& options) { fFBFetchSupport = false; fFBFetchNeedsCustomOutput = false; fBindlessTextureSupport = false; + fUsesPrecisionModifiers = false; fFBFetchColorName = nullptr; fFBFetchExtensionString = nullptr; fAdvBlendEqInteraction = kNotSupported_AdvBlendEqInteraction; @@ -42,6 +43,7 @@ SkString GrGLSLCaps::dump() const { r.appendf("FB Fetch Support: %s\n", (fFBFetchSupport ? "YES" : "NO")); r.appendf("Drops tile on zero divide: %s\n", (fDropsTileOnZeroDivide ? "YES" : "NO")); r.appendf("Bindless texture support: %s\n", (fBindlessTextureSupport ? "YES" : "NO")); + r.appendf("Uses precision modifiers: %s\n", (fUsesPrecisionModifiers ? "YES" : "NO")); r.appendf("Advanced blend equation interaction: %s\n", kAdvBlendEqInteractionStr[fAdvBlendEqInteraction]); return r; diff --git a/src/gpu/glsl/GrGLSLCaps.h b/src/gpu/glsl/GrGLSLCaps.h index b68b3b4a22..d147aac3c1 100755 --- a/src/gpu/glsl/GrGLSLCaps.h +++ b/src/gpu/glsl/GrGLSLCaps.h @@ -65,6 +65,8 @@ public: return fGLSLGeneration > k110_GrGLSLGeneration; } + bool usesPrecisionModifiers() const { return fUsesPrecisionModifiers; } + GrGLSLGeneration generation() const { return fGLSLGeneration; } /** @@ -79,6 +81,8 @@ private: bool fFBFetchSupport : 1; bool fFBFetchNeedsCustomOutput : 1; bool fBindlessTextureSupport : 1; + bool fUsesPrecisionModifiers : 1; + const char* fFBFetchColorName; const char* fFBFetchExtensionString; |