Fixes to 8f1684b7bb, merge pull request 52.

This commit is contained in:
John Kessenich
2015-08-06 22:02:24 -06:00
parent 8f1684b7bb
commit 306695360d
5 changed files with 11 additions and 11 deletions

View File

@@ -1370,9 +1370,9 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty
builder.addMemberDecoration(spvType, member, spv::DecorationOffset, glslangType.getQualifier().layoutXfbOffset);
// built-in variable decorations
int builtIn = TranslateBuiltInDecoration(glslangType.getQualifier().builtIn);
if ((unsigned int)builtIn != spv::BadValue)
builder.addMemberDecoration(spvType, member, spv::DecorationBuiltIn, builtIn);
spv::BuiltIn builtIn = TranslateBuiltInDecoration(glslangType.getQualifier().builtIn);
if (builtIn != spv::BadValue)
builder.addMemberDecoration(spvType, member, spv::DecorationBuiltIn, (int)builtIn);
}
}
@@ -2518,9 +2518,9 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol
}
// built-in variable decorations
int builtIn = TranslateBuiltInDecoration(symbol->getQualifier().builtIn);
spv::BuiltIn builtIn = TranslateBuiltInDecoration(symbol->getQualifier().builtIn);
if ((unsigned int)builtIn != spv::BadValue)
builder.addDecoration(id, spv::DecorationBuiltIn, builtIn);
builder.addDecoration(id, spv::DecorationBuiltIn, (int)builtIn);
if (linkageOnly)
builder.addDecoration(id, spv::DecorationNoStaticUse);

View File

@@ -1032,7 +1032,7 @@ Id Builder::createRvalueSwizzle(Id typeId, Id source, std::vector<unsigned>& cha
// Comments in header
Id Builder::createLvalueSwizzle(Id typeId, Id target, Id source, std::vector<unsigned>& channels)
{
assert((size_t)getNumComponents(source) == channels.size());
assert(getNumComponents(source) == (int)channels.size());
if (channels.size() == 1 && getNumComponents(source) == 1)
return createCompositeInsert(source, target, typeId, channels.front());
@@ -1471,7 +1471,7 @@ Id Builder::createCompare(Decoration precision, Id value1, Id value2, bool equal
// OpCompositeConstruct
Id Builder::createCompositeConstruct(Id typeId, std::vector<Id>& constituents)
{
assert((isAggregateType(typeId) || getNumTypeComponents(typeId) > 1) && (size_t)getNumTypeComponents(typeId) == constituents.size());
assert(isAggregateType(typeId) || (getNumTypeComponents(typeId) > 1 && getNumTypeComponents(typeId) == (int)constituents.size()));
Instruction* op = new Instruction(getUniqueId(), typeId, OpCompositeConstruct);
for (int c = 0; c < (int)constituents.size(); ++c)