Whitespace: Nonfunctional: fix inconsistent white space, esp. no tabs.

This commit is contained in:
John Kessenich 2016-08-05 17:34:34 -06:00
parent 5c72a73971
commit 267590d452
12 changed files with 58 additions and 58 deletions

View File

@ -149,7 +149,7 @@ enum OperandClass {
OperandMemorySemantics, OperandMemorySemantics,
OperandMemoryAccess, OperandMemoryAccess,
OperandScope, OperandScope,
OperandGroupOperation, OperandGroupOperation,
OperandKernelEnqueueFlags, OperandKernelEnqueueFlags,
OperandKernelProfilingInfo, OperandKernelProfilingInfo,
OperandCapability, OperandCapability,

View File

@ -46,7 +46,7 @@ class TGenericLinker : public TLinker {
public: public:
TGenericLinker(EShExecutable e, int dOptions) : TLinker(e, infoSink), debugOptions(dOptions) { } TGenericLinker(EShExecutable e, int dOptions) : TLinker(e, infoSink), debugOptions(dOptions) { }
bool link(TCompilerList&, TUniformMap*) { return true; } bool link(TCompilerList&, TUniformMap*) { return true; }
void getAttributeBindings(ShBindingTable const **) const { } void getAttributeBindings(ShBindingTable const **) const { }
TInfoSink infoSink; TInfoSink infoSink;
int debugOptions; int debugOptions;
}; };

View File

@ -99,11 +99,11 @@ inline long long int atoll (const char* str)
// //
#define POOL_ALLOCATOR_NEW_DELETE(A) \ #define POOL_ALLOCATOR_NEW_DELETE(A) \
void* operator new(size_t s) { return (A).allocate(s); } \ void* operator new(size_t s) { return (A).allocate(s); } \
void* operator new(size_t, void *_Where) { return (_Where); } \ void* operator new(size_t, void *_Where) { return (_Where); } \
void operator delete(void*) { } \ void operator delete(void*) { } \
void operator delete(void *, void *) { } \ void operator delete(void *, void *) { } \
void* operator new[](size_t s) { return (A).allocate(s); } \ void* operator new[](size_t s) { return (A).allocate(s); } \
void* operator new[](size_t, void *_Where) { return (_Where); } \ void* operator new[](size_t, void *_Where) { return (_Where); } \
void operator delete[](void*) { } \ void operator delete[](void*) { } \
void operator delete[](void *, void *) { } void operator delete[](void *, void *) { }

View File

@ -297,10 +297,10 @@ public:
pointer allocate(size_type n, const void*) { pointer allocate(size_type n, const void*) {
return reinterpret_cast<pointer>(getAllocator().allocate(n * sizeof(T))); } return reinterpret_cast<pointer>(getAllocator().allocate(n * sizeof(T))); }
void deallocate(void*, size_type) { } void deallocate(void*, size_type) { }
void deallocate(pointer, size_type) { } void deallocate(pointer, size_type) { }
pointer _Charalloc(size_t n) { pointer _Charalloc(size_t n) {
return reinterpret_cast<pointer>(getAllocator().allocate(n)); } return reinterpret_cast<pointer>(getAllocator().allocate(n)); }
void construct(pointer p, const T& val) { new ((void *)p) T(val); } void construct(pointer p, const T& val) { new ((void *)p) T(val); }

View File

@ -123,8 +123,8 @@ public:
haveReturnableObjectCode(false), haveReturnableObjectCode(false),
appAttributeBindings(0), appAttributeBindings(0),
fixedAttributeBindings(0), fixedAttributeBindings(0),
excludedAttributes(0), excludedAttributes(0),
excludedCount(0), excludedCount(0),
uniformBindings(0) { } uniformBindings(0) { }
virtual TLinker* getAsLinker() { return this; } virtual TLinker* getAsLinker() { return this; }
virtual ~TLinker() { } virtual ~TLinker() { }
@ -132,8 +132,8 @@ public:
virtual bool link(THandleList&) { return false; } virtual bool link(THandleList&) { return false; }
virtual void setAppAttributeBindings(const ShBindingTable* t) { appAttributeBindings = t; } virtual void setAppAttributeBindings(const ShBindingTable* t) { appAttributeBindings = t; }
virtual void setFixedAttributeBindings(const ShBindingTable* t) { fixedAttributeBindings = t; } virtual void setFixedAttributeBindings(const ShBindingTable* t) { fixedAttributeBindings = t; }
virtual void getAttributeBindings(ShBindingTable const **t) const = 0; virtual void getAttributeBindings(ShBindingTable const **t) const = 0;
virtual void setExcludedAttributes(const int* attributes, int count) { excludedAttributes = attributes; excludedCount = count; } virtual void setExcludedAttributes(const int* attributes, int count) { excludedAttributes = attributes; excludedCount = count; }
virtual ShBindingTable* getUniformBindings() const { return uniformBindings; } virtual ShBindingTable* getUniformBindings() const { return uniformBindings; }
virtual const void* getObjectCode() const { return 0; } // a real compiler would be returning object code here virtual const void* getObjectCode() const { return 0; } // a real compiler would be returning object code here
virtual TInfoSink& getInfoSink() { return infoSink; } virtual TInfoSink& getInfoSink() { return infoSink; }
@ -145,8 +145,8 @@ protected:
const ShBindingTable* appAttributeBindings; const ShBindingTable* appAttributeBindings;
const ShBindingTable* fixedAttributeBindings; const ShBindingTable* fixedAttributeBindings;
const int* excludedAttributes; const int* excludedAttributes;
int excludedCount; int excludedCount;
ShBindingTable* uniformBindings; // created by the linker ShBindingTable* uniformBindings; // created by the linker
}; };

View File

@ -2,5 +2,5 @@
// For the version, it uses the latest git tag followed by the number of commits. // 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). // For the date, it uses the current date (when then script is run).
#define GLSLANG_REVISION "SPIRV99.1384" #define GLSLANG_REVISION "SPIRV99.1390"
#define GLSLANG_DATE "05-Aug-2016" #define GLSLANG_DATE "05-Aug-2016"

View File

@ -253,7 +253,7 @@ void TParseContext::handlePragma(const TSourceLoc& loc, const TVector<TString>&
// //
bool TParseContext::parseVectorFields(const TSourceLoc& loc, const TString& compString, int vecSize, TVectorFields& fields) bool TParseContext::parseVectorFields(const TSourceLoc& loc, const TString& compString, int vecSize, TVectorFields& fields)
{ {
fields.num = (int) compString.size(); fields.num = (int)compString.size();
if (fields.num > 4) { if (fields.num > 4) {
error(loc, "illegal vector field selection", compString.c_str(), ""); error(loc, "illegal vector field selection", compString.c_str(), "");
return false; return false;
@ -865,7 +865,7 @@ TIntermTyped* TParseContext::handleDotDereference(const TSourceLoc& loc, TInterm
TString vectorString = field; TString vectorString = field;
TIntermTyped* index = intermediate.addSwizzle(fields, loc); TIntermTyped* index = intermediate.addSwizzle(fields, loc);
result = intermediate.addIndex(EOpVectorSwizzle, base, index, loc); result = intermediate.addIndex(EOpVectorSwizzle, base, index, loc);
result->setType(TType(base->getBasicType(), EvqTemporary, base->getType().getQualifier().precision, (int) vectorString.size())); result->setType(TType(base->getBasicType(), EvqTemporary, base->getType().getQualifier().precision, (int)vectorString.size()));
} }
// Swizzle operations propagate specialization-constantness // Swizzle operations propagate specialization-constantness
if (base->getType().getQualifier().isSpecConstant()) if (base->getType().getQualifier().isSpecConstant())

View File

@ -53,7 +53,7 @@ void InitializeMemoryPools()
TThreadMemoryPools* threadData = new TThreadMemoryPools(); TThreadMemoryPools* threadData = new TThreadMemoryPools();
threadData->threadPoolAllocator = threadPoolAllocator; threadData->threadPoolAllocator = threadPoolAllocator;
OS_SetTLSValue(PoolIndex, threadData); OS_SetTLSValue(PoolIndex, threadData);
} }
@ -63,7 +63,7 @@ void FreeGlobalPools()
TThreadMemoryPools* globalPools = static_cast<TThreadMemoryPools*>(OS_GetTLSValue(PoolIndex)); TThreadMemoryPools* globalPools = static_cast<TThreadMemoryPools*>(OS_GetTLSValue(PoolIndex));
if (! globalPools) if (! globalPools)
return; return;
GetThreadPoolAllocator().popAll(); GetThreadPoolAllocator().popAll();
delete &GetThreadPoolAllocator(); delete &GetThreadPoolAllocator();
delete globalPools; delete globalPools;
@ -149,12 +149,12 @@ TPoolAllocator::TPoolAllocator(int growthIncrement, int allocationAlignment) :
TPoolAllocator::~TPoolAllocator() TPoolAllocator::~TPoolAllocator()
{ {
while (inUseList) { while (inUseList) {
tHeader* next = inUseList->nextPage; tHeader* next = inUseList->nextPage;
inUseList->~tHeader(); inUseList->~tHeader();
delete [] reinterpret_cast<char*>(inUseList); delete [] reinterpret_cast<char*>(inUseList);
inUseList = next; inUseList = next;
} }
// //
// Always delete the free list memory - it can't be being // Always delete the free list memory - it can't be being

View File

@ -250,7 +250,7 @@ TSymbol::TSymbol(const TSymbol& copyOf)
} }
TVariable::TVariable(const TVariable& copyOf) : TSymbol(copyOf) TVariable::TVariable(const TVariable& copyOf) : TSymbol(copyOf)
{ {
type.deepCopy(copyOf.type); type.deepCopy(copyOf.type);
userType = copyOf.userType; userType = copyOf.userType;
numExtensions = 0; numExtensions = 0;
@ -276,7 +276,7 @@ TVariable* TVariable::clone() const
} }
TFunction::TFunction(const TFunction& copyOf) : TSymbol(copyOf) TFunction::TFunction(const TFunction& copyOf) : TSymbol(copyOf)
{ {
for (unsigned int i = 0; i < copyOf.parameters.size(); ++i) { for (unsigned int i = 0; i < copyOf.parameters.size(); ++i) {
TParameter param; TParameter param;
parameters.push_back(param); parameters.push_back(param);

View File

@ -55,12 +55,12 @@ namespace glslang {
inline OS_TLSIndex ToGenericTLSIndex (DWORD handle) inline OS_TLSIndex ToGenericTLSIndex (DWORD handle)
{ {
return (OS_TLSIndex)((uintptr_t)handle + 1); return (OS_TLSIndex)((uintptr_t)handle + 1);
} }
inline DWORD ToNativeTLSIndex (OS_TLSIndex nIndex) inline DWORD ToNativeTLSIndex (OS_TLSIndex nIndex)
{ {
return (DWORD)((uintptr_t)nIndex - 1); return (DWORD)((uintptr_t)nIndex - 1);
} }
// //
@ -68,46 +68,46 @@ inline DWORD ToNativeTLSIndex (OS_TLSIndex nIndex)
// //
OS_TLSIndex OS_AllocTLSIndex() OS_TLSIndex OS_AllocTLSIndex()
{ {
DWORD dwIndex = TlsAlloc(); DWORD dwIndex = TlsAlloc();
if (dwIndex == TLS_OUT_OF_INDEXES) { if (dwIndex == TLS_OUT_OF_INDEXES) {
assert(0 && "OS_AllocTLSIndex(): Unable to allocate Thread Local Storage"); assert(0 && "OS_AllocTLSIndex(): Unable to allocate Thread Local Storage");
return OS_INVALID_TLS_INDEX; return OS_INVALID_TLS_INDEX;
} }
return ToGenericTLSIndex(dwIndex); return ToGenericTLSIndex(dwIndex);
} }
bool OS_SetTLSValue(OS_TLSIndex nIndex, void *lpvValue) bool OS_SetTLSValue(OS_TLSIndex nIndex, void *lpvValue)
{ {
if (nIndex == OS_INVALID_TLS_INDEX) { if (nIndex == OS_INVALID_TLS_INDEX) {
assert(0 && "OS_SetTLSValue(): Invalid TLS Index"); assert(0 && "OS_SetTLSValue(): Invalid TLS Index");
return false; return false;
} }
if (TlsSetValue(ToNativeTLSIndex(nIndex), lpvValue)) if (TlsSetValue(ToNativeTLSIndex(nIndex), lpvValue))
return true; return true;
else else
return false; return false;
} }
void* OS_GetTLSValue(OS_TLSIndex nIndex) void* OS_GetTLSValue(OS_TLSIndex nIndex)
{ {
assert(nIndex != OS_INVALID_TLS_INDEX); assert(nIndex != OS_INVALID_TLS_INDEX);
return TlsGetValue(ToNativeTLSIndex(nIndex)); return TlsGetValue(ToNativeTLSIndex(nIndex));
} }
bool OS_FreeTLSIndex(OS_TLSIndex nIndex) bool OS_FreeTLSIndex(OS_TLSIndex nIndex)
{ {
if (nIndex == OS_INVALID_TLS_INDEX) { if (nIndex == OS_INVALID_TLS_INDEX) {
assert(0 && "OS_SetTLSValue(): Invalid TLS Index"); assert(0 && "OS_SetTLSValue(): Invalid TLS Index");
return false; return false;
} }
if (TlsFree(ToNativeTLSIndex(nIndex))) if (TlsFree(ToNativeTLSIndex(nIndex)))
return true; return true;
else else
return false; return false;
} }
HANDLE GlobalLock; HANDLE GlobalLock;
@ -129,7 +129,7 @@ void ReleaseGlobalLock()
unsigned int __stdcall EnterGenericThread (void* entry) unsigned int __stdcall EnterGenericThread (void* entry)
{ {
return ((TThreadEntrypoint)entry)(0); return ((TThreadEntrypoint)entry)(0);
} }
void* OS_CreateThread(TThreadEntrypoint entry) void* OS_CreateThread(TThreadEntrypoint entry)

View File

@ -274,11 +274,11 @@ bool HlslGrammar::acceptDeclaration(TIntermNode*& node)
TType type; TType type;
// DX9 sampler declaration use a different syntax // DX9 sampler declaration use a different syntax
// DX9 shaders need to run through HLSL compiler (fxc) via a back compat mode, it isn't going to // DX9 shaders need to run through HLSL compiler (fxc) via a back compat mode, it isn't going to
// be possible to simultanously compile D3D10+ style shaders and DX9 shaders. If we want to compile DX9 // be possible to simultaneously compile D3D10+ style shaders and DX9 shaders. If we want to compile DX9
// HLSL shaders, this will have to be a master level switch // HLSL shaders, this will have to be a master level switch
// As such, the sampler keyword in D3D10+ turns into an automatic sampler type, and is commonly used // As such, the sampler keyword in D3D10+ turns into an automatic sampler type, and is commonly used
// For that reason, this line is commented out // For that reason, this line is commented out
// if (acceptSamplerDeclarationDX9(type)) // if (acceptSamplerDeclarationDX9(type))
// return true; // return true;

View File

@ -998,7 +998,7 @@ void HlslParseContext::decomposeSampleMethods(const TSourceLoc& loc, TIntermType
const TSampler& texSampler = texType.getSampler(); const TSampler& texSampler = texType.getSampler();
const TSamplerDim dim = texSampler.dim; const TSamplerDim dim = texSampler.dim;
const int numArgs = (int) argAggregate->getSequence().size(); const int numArgs = (int)argAggregate->getSequence().size();
int numDims = 0; int numDims = 0;
@ -1184,7 +1184,7 @@ void HlslParseContext::decomposeSampleMethods(const TSourceLoc& loc, TIntermType
lodComponent->setType(TType(coordBaseType, EvqTemporary, 1)); lodComponent->setType(TType(coordBaseType, EvqTemporary, 1));
} }
const int numArgs = (int) argAggregate->getSequence().size(); const int numArgs = (int)argAggregate->getSequence().size();
const bool hasOffset = ((!isMS && numArgs == 3) || (isMS && numArgs == 4)); const bool hasOffset = ((!isMS && numArgs == 3) || (isMS && numArgs == 4));
// Create texel fetch // Create texel fetch
@ -1228,7 +1228,7 @@ void HlslParseContext::decomposeSampleMethods(const TSourceLoc& loc, TIntermType
TIntermTyped* argLod = argAggregate->getSequence()[3]->getAsTyped(); TIntermTyped* argLod = argAggregate->getSequence()[3]->getAsTyped();
TIntermTyped* argOffset = nullptr; TIntermTyped* argOffset = nullptr;
const int numArgs = (int) argAggregate->getSequence().size(); const int numArgs = (int)argAggregate->getSequence().size();
if (numArgs == 5) // offset, if present if (numArgs == 5) // offset, if present
argOffset = argAggregate->getSequence()[4]->getAsTyped(); argOffset = argAggregate->getSequence()[4]->getAsTyped();