SPV: Emit names of specialization constants

This commit is contained in:
Endre Oma
2017-01-31 21:08:19 +01:00
parent 7e134cdfbe
commit ad58d45437
9 changed files with 192 additions and 157 deletions

View File

@@ -4971,7 +4971,9 @@ spv::Id TGlslangToSpvTraverser::createSpvConstant(const glslang::TIntermTyped& n
return accessChainLoad(sub_tree->getType());
} else if (auto* const_union_array = &sn->getConstArray()){
int nextConst = 0;
return createSpvConstantFromConstUnionArray(sn->getType(), *const_union_array, nextConst, true);
spv::Id id = createSpvConstantFromConstUnionArray(sn->getType(), *const_union_array, nextConst, true);
builder.addName(id, sn->getName().c_str());
return id;
}
}