Fixes to 8f1684b7bb881813365efd013b05bc0900a52a0c, merge pull request 52.
diff --git a/SPIRV/GlslangToSpv.cpp b/SPIRV/GlslangToSpv.cpp
index fcdab39..ce4a520 100644
--- a/SPIRV/GlslangToSpv.cpp
+++ b/SPIRV/GlslangToSpv.cpp
@@ -1370,9 +1370,9 @@
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 @@
}
// 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);
diff --git a/SPIRV/SpvBuilder.cpp b/SPIRV/SpvBuilder.cpp
index 474e78d..8d6b4e8 100644
--- a/SPIRV/SpvBuilder.cpp
+++ b/SPIRV/SpvBuilder.cpp
@@ -1032,7 +1032,7 @@
// 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 @@
// 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)
diff --git a/glslang/Include/revision.h b/glslang/Include/revision.h
index 4cee7a8..98ff8ed 100644
--- a/glslang/Include/revision.h
+++ b/glslang/Include/revision.h
@@ -2,5 +2,5 @@
// For the version, it uses the latest git tag followed by the number of commits.
// For the date, it uses the current date (when then script is run).
-#define GLSLANG_REVISION "2.2.687"
-#define GLSLANG_DATE "03-Aug-2015"
+#define GLSLANG_REVISION "2.2.699"
+#define GLSLANG_DATE "06-Aug-2015"
diff --git a/glslang/MachineIndependent/Constant.cpp b/glslang/MachineIndependent/Constant.cpp
index b5982fa..e64ee3d 100644
--- a/glslang/MachineIndependent/Constant.cpp
+++ b/glslang/MachineIndependent/Constant.cpp
@@ -172,7 +172,7 @@
case EbtInt:
if (rightUnionArray[i] == 0)
newConstArray[i].setIConst(0x7FFFFFFF);
- else if (rightUnionArray[i].getIConst() == -1 && (unsigned int)unionArray[i].getIConst() == 0x80000000)
+ else if (rightUnionArray[i].getIConst() == -1 && unionArray[i].getIConst() == 0x80000000)
newConstArray[i].setIConst(0x80000000);
else
newConstArray[i].setIConst(unionArray[i].getIConst() / rightUnionArray[i].getIConst());
diff --git a/glslang/MachineIndependent/Scan.h b/glslang/MachineIndependent/Scan.h
index 245d489..936b99f 100644
--- a/glslang/MachineIndependent/Scan.h
+++ b/glslang/MachineIndependent/Scan.h
@@ -172,7 +172,7 @@
void advance()
{
++currentChar;
- if (currentChar >= static_cast<size_t>(lengths[currentSource])) {
+ if (currentChar >= lengths[currentSource]) {
++currentSource;
if (currentSource < numSources) {
loc[currentSource].string = loc[currentSource - 1].string + 1;