Fix #1331: Emit SPV_GOOGLE_hlsl_functionality1 for counters.

It was missing when there were no semantics.
This commit is contained in:
John Kessenich
2018-04-05 19:35:38 -06:00
parent 7f0bcfd8d8
commit f52b63812a
4 changed files with 76 additions and 1 deletions

View File

@@ -1279,8 +1279,10 @@ void TGlslangToSpvTraverser::visitSymbol(glslang::TIntermSymbol* symbol)
id = getSymbolId(it->second);
if (id != spv::NoResult) {
spv::Id counterId = getSymbolId(symbol);
if (counterId != spv::NoResult)
if (counterId != spv::NoResult) {
builder.addExtension("SPV_GOOGLE_hlsl_functionality1");
builder.addDecorationId(id, spv::DecorationHlslCounterBufferGOOGLE, counterId);
}
}
}
}