Compile fixes for gcc -Wall

This commit is contained in:
baldurk
2015-08-05 20:54:58 +02:00
parent 0718e45c24
commit d7c5ead6a1
12 changed files with 27 additions and 24 deletions

View File

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

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(getNumComponents(source) == channels.size());
assert((size_t)getNumComponents(source) == 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 && getNumTypeComponents(typeId) == constituents.size());
assert((isAggregateType(typeId) || getNumTypeComponents(typeId) > 1) && (size_t)getNumTypeComponents(typeId) == constituents.size());
Instruction* op = new Instruction(getUniqueId(), typeId, OpCompositeConstruct);
for (int c = 0; c < (int)constituents.size(); ++c)