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>
This commit is contained in:
Chris Dalton 2019-07-19 15:31:59 -06:00 committed by Skia Commit-Bot
parent b34cf22810
commit a7ad120fb6
2 changed files with 2 additions and 2 deletions

View File

@ -216,7 +216,7 @@ public:
}
const char* sampleVariablesExtensionString() const {
SkASSERT(this->sampleVariablesSupport());
SkASSERT(this->sampleVariablesSupport() || this->sampleVariablesStencilSupport());
return fSampleVariablesExtensionString;
}

View File

@ -94,7 +94,7 @@ const char* GrGLSLFragmentShaderBuilder::sampleOffsets() {
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;
}