on x64, size_t is 64-bit and int is 32-bit, so needs an explicit cast
diff --git a/SPIRV/GlslangToSpv.cpp b/SPIRV/GlslangToSpv.cpp
index 86d18a5..e60fca9 100644
--- a/SPIRV/GlslangToSpv.cpp
+++ b/SPIRV/GlslangToSpv.cpp
@@ -1099,9 +1099,9 @@
for (glslang::TIntermSequence::iterator c = sequence.begin(); c != sequence.end(); ++c) {
TIntermNode* child = *c;
if (child->getAsBranchNode() && child->getAsBranchNode()->getFlowOp() == glslang::EOpDefault)
- defaultSegment = codeSegments.size();
+ defaultSegment = (int)codeSegments.size();
else if (child->getAsBranchNode() && child->getAsBranchNode()->getFlowOp() == glslang::EOpCase) {
- valueIndexToSegment[caseValues.size()] = codeSegments.size();
+ valueIndexToSegment[caseValues.size()] = (int)codeSegments.size();
caseValues.push_back(child->getAsBranchNode()->getExpression()->getAsConstantUnion()->getConstArray()[0].getIConst());
} else
codeSegments.push_back(child);
@@ -1115,7 +1115,7 @@
// make the switch statement
std::vector<spv::Block*> segmentBlocks; // returned, as the blocks allocated in the call
- builder.makeSwitch(selector, codeSegments.size(), caseValues, valueIndexToSegment, defaultSegment, segmentBlocks);
+ builder.makeSwitch(selector, (int)codeSegments.size(), caseValues, valueIndexToSegment, defaultSegment, segmentBlocks);
// emit all the code in the segments
breakForLoop.push(false);
diff --git a/SPIRV/SpvBuilder.cpp b/SPIRV/SpvBuilder.cpp
index 73e9d01..75e622c 100644
--- a/SPIRV/SpvBuilder.cpp
+++ b/SPIRV/SpvBuilder.cpp
@@ -704,7 +704,7 @@
Function* Builder::makeFunctionEntry(Id returnType, const char* name, std::vector<Id>& paramTypes, Block **entry)
{
Id typeId = makeFunctionType(returnType, paramTypes);
- Id firstParamId = paramTypes.size() == 0 ? 0 : getUniqueIds(paramTypes.size());
+ Id firstParamId = paramTypes.size() == 0 ? 0 : getUniqueIds((int)paramTypes.size());
Function* function = new Function(getUniqueId(), returnType, typeId, firstParamId, module);
if (entry) {
@@ -1943,7 +1943,7 @@
// static swizzle
Id resultType = componentType;
if (accessChain.swizzle.size() > 1)
- resultType = makeVectorType(componentType, accessChain.swizzle.size());
+ resultType = makeVectorType(componentType, (int)accessChain.swizzle.size());
id = createRvalueSwizzle(resultType, id, accessChain.swizzle);
}