Make 64-bit VS compile clean. Mostly size_t vs. int tweaks.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@25411 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
parent
8922da24a4
commit
35f04bde8a
13 changed files with 591 additions and 17 deletions
|
|
@ -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())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue