aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/glsl
diff options
context:
space:
mode:
authorGravatar egdaniel <egdaniel@google.com>2015-10-21 07:14:17 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-10-21 07:14:17 -0700
commitf529439fea003851d986a0573a7e0465754b2a48 (patch)
treec3bca1ae5cbc5be61322f48a65d3aaafc96bbc00 /src/gpu/glsl
parent02141734f2f89fa4e89ba804bc06fa80ed0fc316 (diff)
Move shader precision modifier check onto GLSLCaps
Diffstat (limited to 'src/gpu/glsl')
-rwxr-xr-xsrc/gpu/glsl/GrGLSLCaps.cpp2
-rwxr-xr-xsrc/gpu/glsl/GrGLSLCaps.h4
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;