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:
parent
6dc09cd0f3
commit
bcef333a78
2 changed files with 3 additions and 1 deletions
|
|
@ -2393,6 +2393,8 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol
|
||||||
addDecoration(id, TranslateInterpolationDecoration(symbol->getType()));
|
addDecoration(id, TranslateInterpolationDecoration(symbol->getType()));
|
||||||
if (symbol->getQualifier().hasLocation())
|
if (symbol->getQualifier().hasLocation())
|
||||||
builder.addDecoration(id, spv::DecorationLocation, symbol->getQualifier().layoutLocation);
|
builder.addDecoration(id, spv::DecorationLocation, symbol->getQualifier().layoutLocation);
|
||||||
|
if (symbol->getQualifier().hasIndex())
|
||||||
|
builder.addDecoration(id, spv::DecorationIndex, symbol->getQualifier().layoutIndex);
|
||||||
if (symbol->getQualifier().hasComponent())
|
if (symbol->getQualifier().hasComponent())
|
||||||
builder.addDecoration(id, spv::DecorationComponent, symbol->getQualifier().layoutComponent);
|
builder.addDecoration(id, spv::DecorationComponent, symbol->getQualifier().layoutComponent);
|
||||||
if (glslangIntermediate->getXfbMode()) {
|
if (glslangIntermediate->getXfbMode()) {
|
||||||
|
|
|
||||||
|
|
@ -450,7 +450,7 @@ Id Builder::findScalarConstant(Op typeClass, Id typeId, unsigned value) const
|
||||||
return 0;
|
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
|
Id Builder::findScalarConstant(Op typeClass, Id typeId, unsigned v1, unsigned v2) const
|
||||||
{
|
{
|
||||||
Instruction* constant;
|
Instruction* constant;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue