spirv: Generate missing SampleMaskOverrideCoverageNV capability op

The SampleMaskOverrideCoverageNV capability should be declared when
gl_SampleMask is used.
This commit is contained in:
Jason Macnak
2019-07-12 14:33:02 -07:00
parent 71892a5eda
commit dbd4c3ce11
4 changed files with 4 additions and 1 deletions

View File

@@ -7738,6 +7738,7 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol
decoration = (spv::Decoration)spv::DecorationMax;
builder.addDecoration(id, decoration);
if (decoration != spv::DecorationMax) {
builder.addCapability(spv::CapabilitySampleMaskOverrideCoverageNV);
builder.addExtension(spv::E_SPV_NV_sample_mask_override_coverage);
}
}