diff options
author | 2016-03-11 14:07:38 -0800 | |
---|---|---|
committer | 2016-03-11 14:07:38 -0800 | |
commit | c04ce676d4516a8c64e29e1f60bb72cd2c6c0a59 (patch) | |
tree | 5c432eac89ac2915f8ef22f4f2701516e0a85de2 /src/gpu/glsl | |
parent | 5f2d8e28c4f8ec0ead92eb613254063ace4e90b4 (diff) |
Add caps and GL API for buffer texture
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1784063003
Review URL: https://codereview.chromium.org/1784063003
Diffstat (limited to 'src/gpu/glsl')
-rwxr-xr-x | src/gpu/glsl/GrGLSLCaps.cpp | 3 | ||||
-rwxr-xr-x | src/gpu/glsl/GrGLSLCaps.h | 9 |
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; |