Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(326)

Unified Diff: src/gpu/glsl/GrGLSLCaps.h

Issue 1690963003: Add gl_SampleMask functionality to fragment builders (Closed) Base URL: https://skia.googlesource.com/skia.git@upload7_interp
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/gpu/glsl/GrGLSLCaps.h
diff --git a/src/gpu/glsl/GrGLSLCaps.h b/src/gpu/glsl/GrGLSLCaps.h
index 2f87f6685032cdf9af8266767c98c9fbb4ed01b7..ee0fbff4b9d4e12196df294cd245557765b5b2fd 100755
--- a/src/gpu/glsl/GrGLSLCaps.h
+++ b/src/gpu/glsl/GrGLSLCaps.h
@@ -54,6 +54,10 @@ public:
bool dropsTileOnZeroDivide() const { return fDropsTileOnZeroDivide; }
+ bool sampleVariablesSupport() const { return fSampleVariablesSupport; }
+
+ bool sampleMaskOverrideCoverageSupport() const { return fSampleMaskOverrideCoverageSupport; }
+
bool flatInterpolationSupport() const { return fFlatInterpolationSupport; }
bool noperspectiveInterpolationSupport() const { return fNoPerspectiveInterpolationSupport; }
@@ -88,6 +92,11 @@ public:
SkASSERT(this->shaderDerivativeSupport());
return fShaderDerivativeExtensionString;
}
+
+ const char* sampleVariablesExtensionString() const {
+ SkASSERT(this->sampleVariablesSupport());
+ return fSampleVariablesExtensionString;
+ }
// Returns the string of an extension that will do all necessary coord transfomations needed
// when reading the fragment position. If such an extension does not exisits, this function
@@ -146,6 +155,8 @@ private:
bool fBindlessTextureSupport : 1;
bool fUsesPrecisionModifiers : 1;
bool fCanUseAnyFunctionInShader : 1;
+ bool fSampleVariablesSupport : 1;
+ bool fSampleMaskOverrideCoverageSupport : 1;
bool fFlatInterpolationSupport : 1;
bool fNoPerspectiveInterpolationSupport : 1;
@@ -156,6 +167,7 @@ private:
const char* fVersionDeclString;
const char* fShaderDerivativeExtensionString;
+ const char* fSampleVariablesExtensionString;
const char* fFragCoordConventionsExtensionString;
const char* fSecondaryOutputExtensionString;
const char* fExternalTextureExtensionString;

Powered by Google App Engine
This is Rietveld 408576698