Commit 35f04bde by John Kessenich

Make 64-bit VS compile clean. Mostly size_t vs. int tweaks.

parent 8922da24
......@@ -7,27 +7,47 @@ EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug CRT DLL|Win32 = Debug CRT DLL|Win32
Debug CRT DLL|x64 = Debug CRT DLL|x64
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release CRT DLL|Win32 = Release CRT DLL|Win32
Release CRT DLL|x64 = Release CRT DLL|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{660D0A05-69A9-4F09-9664-02FBEB08FAE2}.Debug CRT DLL|Win32.ActiveCfg = Debug CRT DLL|Win32
{660D0A05-69A9-4F09-9664-02FBEB08FAE2}.Debug CRT DLL|Win32.Build.0 = Debug CRT DLL|Win32
{660D0A05-69A9-4F09-9664-02FBEB08FAE2}.Debug CRT DLL|x64.ActiveCfg = Debug CRT DLL|x64
{660D0A05-69A9-4F09-9664-02FBEB08FAE2}.Debug CRT DLL|x64.Build.0 = Debug CRT DLL|x64
{660D0A05-69A9-4F09-9664-02FBEB08FAE2}.Debug|Win32.ActiveCfg = Debug|Win32
{660D0A05-69A9-4F09-9664-02FBEB08FAE2}.Debug|Win32.Build.0 = Debug|Win32
{660D0A05-69A9-4F09-9664-02FBEB08FAE2}.Debug|x64.ActiveCfg = Debug|x64
{660D0A05-69A9-4F09-9664-02FBEB08FAE2}.Debug|x64.Build.0 = Debug|x64
{660D0A05-69A9-4F09-9664-02FBEB08FAE2}.Release CRT DLL|Win32.ActiveCfg = Release CRT DLL|Win32
{660D0A05-69A9-4F09-9664-02FBEB08FAE2}.Release CRT DLL|Win32.Build.0 = Release CRT DLL|Win32
{660D0A05-69A9-4F09-9664-02FBEB08FAE2}.Release CRT DLL|x64.ActiveCfg = Release CRT DLL|x64
{660D0A05-69A9-4F09-9664-02FBEB08FAE2}.Release CRT DLL|x64.Build.0 = Release CRT DLL|x64
{660D0A05-69A9-4F09-9664-02FBEB08FAE2}.Release|Win32.ActiveCfg = Release|Win32
{660D0A05-69A9-4F09-9664-02FBEB08FAE2}.Release|Win32.Build.0 = Release|Win32
{660D0A05-69A9-4F09-9664-02FBEB08FAE2}.Release|x64.ActiveCfg = Release|x64
{660D0A05-69A9-4F09-9664-02FBEB08FAE2}.Release|x64.Build.0 = Release|x64
{3B146CC5-B2B8-4573-9D46-6139E2EDFEA3}.Debug CRT DLL|Win32.ActiveCfg = Debug CRT DLL|Win32
{3B146CC5-B2B8-4573-9D46-6139E2EDFEA3}.Debug CRT DLL|Win32.Build.0 = Debug CRT DLL|Win32
{3B146CC5-B2B8-4573-9D46-6139E2EDFEA3}.Debug CRT DLL|x64.ActiveCfg = Debug CRT DLL|x64
{3B146CC5-B2B8-4573-9D46-6139E2EDFEA3}.Debug CRT DLL|x64.Build.0 = Debug CRT DLL|x64
{3B146CC5-B2B8-4573-9D46-6139E2EDFEA3}.Debug|Win32.ActiveCfg = Debug|Win32
{3B146CC5-B2B8-4573-9D46-6139E2EDFEA3}.Debug|Win32.Build.0 = Debug|Win32
{3B146CC5-B2B8-4573-9D46-6139E2EDFEA3}.Debug|x64.ActiveCfg = Debug|x64
{3B146CC5-B2B8-4573-9D46-6139E2EDFEA3}.Debug|x64.Build.0 = Debug|x64
{3B146CC5-B2B8-4573-9D46-6139E2EDFEA3}.Release CRT DLL|Win32.ActiveCfg = Release CRT DLL|Win32
{3B146CC5-B2B8-4573-9D46-6139E2EDFEA3}.Release CRT DLL|Win32.Build.0 = Release CRT DLL|Win32
{3B146CC5-B2B8-4573-9D46-6139E2EDFEA3}.Release CRT DLL|x64.ActiveCfg = Release CRT DLL|x64
{3B146CC5-B2B8-4573-9D46-6139E2EDFEA3}.Release CRT DLL|x64.Build.0 = Release CRT DLL|x64
{3B146CC5-B2B8-4573-9D46-6139E2EDFEA3}.Release|Win32.ActiveCfg = Release|Win32
{3B146CC5-B2B8-4573-9D46-6139E2EDFEA3}.Release|Win32.Build.0 = Release|Win32
{3B146CC5-B2B8-4573-9D46-6139E2EDFEA3}.Release|x64.ActiveCfg = Release|x64
{3B146CC5-B2B8-4573-9D46-6139E2EDFEA3}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
......
......@@ -760,7 +760,7 @@ void CompileFile(const char* fileName, ShHandle compiler)
// move to length-based strings, rather than null-terminated strings
for (int s = 0; s < NumShaderStrings; ++s)
lengths[s] = strlen(shaderStrings[s]);
lengths[s] = (int)strlen(shaderStrings[s]);
if (! shaderStrings) {
CompileFailed = true;
......
......@@ -80,7 +80,7 @@ namespace glslang {
int size()
{
return worklist.size();
return (int)worklist.size();
}
bool empty()
......
......@@ -445,8 +445,8 @@ public:
unionArray = new TConstUnionVector(size, val);
}
TConstUnion& operator[](int index) { return (*unionArray)[index]; }
const TConstUnion& operator[](int index) const { return (*unionArray)[index]; }
TConstUnion& operator[](size_t index) { return (*unionArray)[index]; }
const TConstUnion& operator[](size_t index) const { return (*unionArray)[index]; }
bool operator==(const TConstUnionArray& rhs) const
{
// this includes the case that both are unallocated
......
......@@ -9,5 +9,5 @@
// source have to figure out how to create revision.h just to get a build
// going. However, if it is not updated, it can be a version behind.
#define GLSLANG_REVISION "25400"
#define GLSLANG_DATE "2014/02/18 16:37:57"
#define GLSLANG_REVISION "25408"
#define GLSLANG_DATE "2014/02/18 18:00:58"
......@@ -3608,7 +3608,7 @@ TIntermTyped* TParseContext::convertInitializerList(TSourceLoc loc, const TType&
TType arrayType;
arrayType.shallowCopy(type);
arrayType.setArraySizes(type);
arrayType.changeArraySize(initList->getSequence().size());
arrayType.changeArraySize((int)initList->getSequence().size());
TType elementType(arrayType, 0); // dereferenced type
for (size_t i = 0; i < initList->getSequence().size(); ++i) {
initList->getSequence()[i] = convertInitializerList(loc, elementType, initList->getSequence()[i]->getAsTyped());
......
......@@ -139,7 +139,7 @@ protected:
const char* const *sources; // array of strings
const size_t *lengths; // length of each string
int currentSource;
int currentChar;
size_t currentChar;
// This is for reporting what string/line an error occurred on, and can be overridden by #line.
// It remembers the last state of each source string as it is left for the next one, so unget()
......
......@@ -106,7 +106,7 @@ bool TInductiveTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* n
if (node->getOp() == EOpFunctionCall) {
// see if an out or inout argument is the loop index
const TIntermSequence& args = node->getSequence();
for (size_t i = 0; i < args.size(); ++i) {
for (int i = 0; i < (int)args.size(); ++i) {
if (args[i]->getAsSymbolNode() && args[i]->getAsSymbolNode()->getId() == loopId) {
TSymbol* function = symbolTable.find(node->getName());
const TType* type = (*function->getAsFunction())[i].type;
......
......@@ -621,7 +621,7 @@ int TIntermediate::computeTypeLocationSize(const TType& type)
// recursively..."
if (type.isStruct()) {
int size = 0;
for (size_t member = 0; member < type.getStruct()->size(); ++member) {
for (int member = 0; member < (int)type.getStruct()->size(); ++member) {
TType memberType(type, member);
size += computeTypeLocationSize(memberType);
}
......@@ -706,7 +706,7 @@ unsigned int TIntermediate::computeTypeXfbSize(const TType& type, bool& contains
if (type.isStruct()) {
unsigned int size = 0;
bool structContainsDouble = false;
for (size_t member = 0; member < type.getStruct()->size(); ++member) {
for (int member = 0; member < (int)type.getStruct()->size(); ++member) {
TType memberType(type, member);
// "... if applied to
// an aggregate containing a double, the offset must also be a multiple of 8,
......
......@@ -137,7 +137,7 @@ public:
int getBlockSize(const TType& blockType)
{
const TTypeList& memberList = *blockType.getStruct();
int lastIndex = memberList.size() - 1;
int lastIndex = (int)memberList.size() - 1;
int lastOffset = getOffset(blockType, lastIndex);
int lastMemberSize;
......@@ -211,7 +211,7 @@ public:
// Visit all members of this aggregate, and for each one,
// fully explode the remaining aggregate to dereference
const TTypeList& typeList = *terminalType->getStruct();
for (size_t i = 0; i < typeList.size(); ++i) {
for (int i = 0; i < (int)typeList.size(); ++i) {
TString newBaseName = name;
newBaseName.append(TString(".") + typeList[i].type->getFieldName());
TType derefType(*terminalType, i);
......@@ -232,7 +232,7 @@ public:
TReflection::TNameToIndex::const_iterator it = reflection.nameToIndex.find(name);
if (it == reflection.nameToIndex.end()) {
reflection.nameToIndex[name] = reflection.indexToUniform.size();
reflection.nameToIndex[name] = (int)reflection.indexToUniform.size();
reflection.indexToUniform.push_back(TObjectReflection(name, offset, mapToGlType(*terminalType), arraySize, blockIndex));
} else if (arraySize > 1) {
int& reflectedArraySize = reflection.indexToUniform[it->second].size;
......@@ -327,7 +327,7 @@ public:
int blockIndex;
TReflection::TNameToIndex::const_iterator it = reflection.nameToIndex.find(name);
if (reflection.nameToIndex.find(name) == reflection.nameToIndex.end()) {
blockIndex = reflection.indexToUniformBlock.size();
blockIndex = (int)reflection.indexToUniformBlock.size();
reflection.nameToIndex[name] = blockIndex;
reflection.indexToUniformBlock.push_back(TObjectReflection(name, -1, -1, size, -1));
} else
......
......@@ -74,7 +74,7 @@ public:
bool addStage(EShLanguage, const TIntermediate&);
// for mapping a uniform index to a uniform object's description
int getNumUniforms() { return indexToUniform.size(); }
int getNumUniforms() { return (int)indexToUniform.size(); }
const TObjectReflection& getUniform(int i) const
{
if (i >= 0 && i < (int)indexToUniform.size())
......@@ -84,7 +84,7 @@ public:
}
// for mapping a block index to the block's description
int getNumUniformBlocks() const { return indexToUniformBlock.size(); }
int getNumUniformBlocks() const { return (int)indexToUniformBlock.size(); }
const TObjectReflection& getUniformBlock(int i) const
{
if (i >= 0 && i < (int)indexToUniformBlock.size())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment