aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/glsl
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/glsl')
-rwxr-xr-xsrc/gpu/glsl/GrGLSLCaps.cpp3
-rwxr-xr-xsrc/gpu/glsl/GrGLSLCaps.h9
2 files changed, 12 insertions, 0 deletions
diff --git a/src/gpu/glsl/GrGLSLCaps.cpp b/src/gpu/glsl/GrGLSLCaps.cpp
index 189b766752..f14274143b 100755
--- a/src/gpu/glsl/GrGLSLCaps.cpp
+++ b/src/gpu/glsl/GrGLSLCaps.cpp
@@ -29,11 +29,13 @@ GrGLSLCaps::GrGLSLCaps(const GrContextOptions& options) {
fSampleVariablesSupport = false;
fSampleMaskOverrideCoverageSupport = false;
fExternalTextureSupport = false;
+ fBufferTextureSupport = false;
fVersionDeclString = nullptr;
fShaderDerivativeExtensionString = nullptr;
fFragCoordConventionsExtensionString = nullptr;
fSecondaryOutputExtensionString = nullptr;
fExternalTextureExtensionString = nullptr;
+ fBufferTextureExtensionString = nullptr;
fNoPerspectiveInterpolationExtensionString = nullptr;
fMultisampleInterpolationExtensionString = nullptr;
fSampleVariablesExtensionString = nullptr;
@@ -80,6 +82,7 @@ SkString GrGLSLCaps::dump() const {
r.appendf("Sample mask override coverage support: %s\n", (fSampleMaskOverrideCoverageSupport ?
"YES" : "NO"));
r.appendf("External texture support: %s\n", (fExternalTextureSupport ? "YES" : "NO"));
+ r.appendf("Buffer texture support: %s\n", (fBufferTextureSupport ? "YES" : "NO"));
r.appendf("Max VS Samplers: %d\n", fMaxVertexSamplers);
r.appendf("Max GS Samplers: %d\n", fMaxGeometrySamplers);
r.appendf("Max FS Samplers: %d\n", fMaxFragmentSamplers);
diff --git a/src/gpu/glsl/GrGLSLCaps.h b/src/gpu/glsl/GrGLSLCaps.h
index f907be2b8d..f54c61d933 100755
--- a/src/gpu/glsl/GrGLSLCaps.h
+++ b/src/gpu/glsl/GrGLSLCaps.h
@@ -66,6 +66,8 @@ public:
bool externalTextureSupport() const { return fExternalTextureSupport; }
+ bool bufferTextureSupport() const { return fBufferTextureSupport; }
+
AdvBlendEqInteraction advBlendEqInteraction() const { return fAdvBlendEqInteraction; }
bool mustEnableAdvBlendEqs() const {
@@ -118,6 +120,11 @@ public:
return fExternalTextureExtensionString;
}
+ const char* bufferTextureExtensionString() const {
+ SkASSERT(this->bufferTextureSupport());
+ return fBufferTextureExtensionString;
+ }
+
const char* noperspectiveInterpolationExtensionString() const {
SkASSERT(this->noperspectiveInterpolationSupport());
return fNoPerspectiveInterpolationExtensionString;
@@ -179,6 +186,7 @@ private:
bool fSampleVariablesSupport : 1;
bool fSampleMaskOverrideCoverageSupport : 1;
bool fExternalTextureSupport : 1;
+ bool fBufferTextureSupport : 1;
// Used for specific driver bug work arounds
bool fCanUseMinAndAbsTogether : 1;
@@ -190,6 +198,7 @@ private:
const char* fFragCoordConventionsExtensionString;
const char* fSecondaryOutputExtensionString;
const char* fExternalTextureExtensionString;
+ const char* fBufferTextureExtensionString;
const char* fNoPerspectiveInterpolationExtensionString;
const char* fMultisampleInterpolationExtensionString;
const char* fSampleVariablesExtensionString;