Fix an error check re: sample variables

Bug: skia:
Change-Id: I89f2912ba18c27a3b2b99b99c13ec92a2cc3ebff
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/228572
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/GrShaderCaps.h b/src/gpu/GrShaderCaps.h
index 1a03b52..850865c 100644
--- a/src/gpu/GrShaderCaps.h
+++ b/src/gpu/GrShaderCaps.h
@@ -216,7 +216,7 @@
     }
 
     const char* sampleVariablesExtensionString() const {
-        SkASSERT(this->sampleVariablesSupport());
+        SkASSERT(this->sampleVariablesSupport() || this->sampleVariablesStencilSupport());
         return fSampleVariablesExtensionString;
     }
 
diff --git a/src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp b/src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp
index c05b30b..2b6894a 100644
--- a/src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp
+++ b/src/gpu/glsl/GrGLSLFragmentShaderBuilder.cpp
@@ -94,7 +94,7 @@
 void GrGLSLFragmentShaderBuilder::maskOffMultisampleCoverage(
         const char* mask, ScopeFlags scopeFlags) {
     const GrShaderCaps& shaderCaps = *fProgramBuilder->shaderCaps();
-    if (!shaderCaps.sampleVariablesSupport()) {
+    if (!shaderCaps.sampleVariablesSupport() && !shaderCaps.sampleVariablesStencilSupport()) {
         SkDEBUGFAIL("Attempted to mask sample coverage without support.");
         return;
     }