SPV: Emit layout(index=) as Index decoration.

git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@30939 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
John Kessenich 2015-04-27 10:03:25 +00:00
parent 6dc09cd0f3
commit bcef333a78
2 changed files with 3 additions and 1 deletions

View File

@ -2393,6 +2393,8 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol
addDecoration(id, TranslateInterpolationDecoration(symbol->getType()));
if (symbol->getQualifier().hasLocation())
builder.addDecoration(id, spv::DecorationLocation, symbol->getQualifier().layoutLocation);
if (symbol->getQualifier().hasIndex())
builder.addDecoration(id, spv::DecorationIndex, symbol->getQualifier().layoutIndex);
if (symbol->getQualifier().hasComponent())
builder.addDecoration(id, spv::DecorationComponent, symbol->getQualifier().layoutComponent);
if (glslangIntermediate->getXfbMode()) {

View File

@ -450,7 +450,7 @@ Id Builder::findScalarConstant(Op typeClass, Id typeId, unsigned value) const
return 0;
}
// Version findScalarConstant (see above) for scalars that take two operands (e.g. a 'double').
// Version of findScalarConstant (see above) for scalars that take two operands (e.g. a 'double').
Id Builder::findScalarConstant(Op typeClass, Id typeId, unsigned v1, unsigned v2) const
{
Instruction* constant;