diff --git a/SPIRV/doc.h b/SPIRV/doc.h index cf9e059b..743896ff 100644 --- a/SPIRV/doc.h +++ b/SPIRV/doc.h @@ -149,7 +149,7 @@ enum OperandClass { OperandMemorySemantics, OperandMemoryAccess, OperandScope, - OperandGroupOperation, + OperandGroupOperation, OperandKernelEnqueueFlags, OperandKernelProfilingInfo, OperandCapability, diff --git a/glslang/GenericCodeGen/Link.cpp b/glslang/GenericCodeGen/Link.cpp index 81609992..8da88bda 100644 --- a/glslang/GenericCodeGen/Link.cpp +++ b/glslang/GenericCodeGen/Link.cpp @@ -46,7 +46,7 @@ class TGenericLinker : public TLinker { public: TGenericLinker(EShExecutable e, int dOptions) : TLinker(e, infoSink), debugOptions(dOptions) { } bool link(TCompilerList&, TUniformMap*) { return true; } - void getAttributeBindings(ShBindingTable const **) const { } + void getAttributeBindings(ShBindingTable const **) const { } TInfoSink infoSink; int debugOptions; }; diff --git a/glslang/Include/Common.h b/glslang/Include/Common.h index 4c04ae32..bc09cdc4 100644 --- a/glslang/Include/Common.h +++ b/glslang/Include/Common.h @@ -99,11 +99,11 @@ inline long long int atoll (const char* str) // #define POOL_ALLOCATOR_NEW_DELETE(A) \ 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 *) { } \ 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 *) { } diff --git a/glslang/Include/PoolAlloc.h b/glslang/Include/PoolAlloc.h index c3bebc63..13af7712 100644 --- a/glslang/Include/PoolAlloc.h +++ b/glslang/Include/PoolAlloc.h @@ -297,10 +297,10 @@ public: pointer allocate(size_type n, const void*) { return reinterpret_cast(getAllocator().allocate(n * sizeof(T))); } - void deallocate(void*, size_type) { } + void deallocate(void*, size_type) { } void deallocate(pointer, size_type) { } - pointer _Charalloc(size_t n) { + pointer _Charalloc(size_t n) { return reinterpret_cast(getAllocator().allocate(n)); } void construct(pointer p, const T& val) { new ((void *)p) T(val); } diff --git a/glslang/Include/ShHandle.h b/glslang/Include/ShHandle.h index fee64139..bfc97db8 100644 --- a/glslang/Include/ShHandle.h +++ b/glslang/Include/ShHandle.h @@ -123,8 +123,8 @@ public: haveReturnableObjectCode(false), appAttributeBindings(0), fixedAttributeBindings(0), - excludedAttributes(0), - excludedCount(0), + excludedAttributes(0), + excludedCount(0), uniformBindings(0) { } virtual TLinker* getAsLinker() { return this; } virtual ~TLinker() { } @@ -132,8 +132,8 @@ public: virtual bool link(THandleList&) { return false; } virtual void setAppAttributeBindings(const ShBindingTable* t) { appAttributeBindings = t; } virtual void setFixedAttributeBindings(const ShBindingTable* t) { fixedAttributeBindings = t; } - virtual void getAttributeBindings(ShBindingTable const **t) const = 0; - virtual void setExcludedAttributes(const int* attributes, int count) { excludedAttributes = attributes; excludedCount = count; } + virtual void getAttributeBindings(ShBindingTable const **t) const = 0; + virtual void setExcludedAttributes(const int* attributes, int count) { excludedAttributes = attributes; excludedCount = count; } virtual ShBindingTable* getUniformBindings() const { return uniformBindings; } virtual const void* getObjectCode() const { return 0; } // a real compiler would be returning object code here virtual TInfoSink& getInfoSink() { return infoSink; } @@ -145,8 +145,8 @@ protected: const ShBindingTable* appAttributeBindings; const ShBindingTable* fixedAttributeBindings; - const int* excludedAttributes; - int excludedCount; + const int* excludedAttributes; + int excludedCount; ShBindingTable* uniformBindings; // created by the linker }; diff --git a/glslang/Include/revision.h b/glslang/Include/revision.h index aba5e580..18057dcf 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 "SPIRV99.1384" +#define GLSLANG_REVISION "SPIRV99.1390" #define GLSLANG_DATE "05-Aug-2016" diff --git a/glslang/MachineIndependent/ParseHelper.cpp b/glslang/MachineIndependent/ParseHelper.cpp index 398de1b4..b117024a 100644 --- a/glslang/MachineIndependent/ParseHelper.cpp +++ b/glslang/MachineIndependent/ParseHelper.cpp @@ -253,7 +253,7 @@ void TParseContext::handlePragma(const TSourceLoc& loc, const TVector& // 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) { error(loc, "illegal vector field selection", compString.c_str(), ""); return false; @@ -865,7 +865,7 @@ TIntermTyped* TParseContext::handleDotDereference(const TSourceLoc& loc, TInterm TString vectorString = field; TIntermTyped* index = intermediate.addSwizzle(fields, 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 if (base->getType().getQualifier().isSpecConstant()) diff --git a/glslang/MachineIndependent/PoolAlloc.cpp b/glslang/MachineIndependent/PoolAlloc.cpp index d56979b4..9dfcd305 100644 --- a/glslang/MachineIndependent/PoolAlloc.cpp +++ b/glslang/MachineIndependent/PoolAlloc.cpp @@ -53,7 +53,7 @@ void InitializeMemoryPools() TThreadMemoryPools* threadData = new TThreadMemoryPools(); threadData->threadPoolAllocator = threadPoolAllocator; - + OS_SetTLSValue(PoolIndex, threadData); } @@ -63,7 +63,7 @@ void FreeGlobalPools() TThreadMemoryPools* globalPools = static_cast(OS_GetTLSValue(PoolIndex)); if (! globalPools) return; - + GetThreadPoolAllocator().popAll(); delete &GetThreadPoolAllocator(); delete globalPools; @@ -149,12 +149,12 @@ TPoolAllocator::TPoolAllocator(int growthIncrement, int allocationAlignment) : TPoolAllocator::~TPoolAllocator() { - while (inUseList) { - tHeader* next = inUseList->nextPage; + while (inUseList) { + tHeader* next = inUseList->nextPage; inUseList->~tHeader(); delete [] reinterpret_cast(inUseList); - inUseList = next; - } + inUseList = next; + } // // Always delete the free list memory - it can't be being diff --git a/glslang/MachineIndependent/SymbolTable.cpp b/glslang/MachineIndependent/SymbolTable.cpp index bf0f1f9f..630053a0 100644 --- a/glslang/MachineIndependent/SymbolTable.cpp +++ b/glslang/MachineIndependent/SymbolTable.cpp @@ -250,7 +250,7 @@ TSymbol::TSymbol(const TSymbol& copyOf) } TVariable::TVariable(const TVariable& copyOf) : TSymbol(copyOf) -{ +{ type.deepCopy(copyOf.type); userType = copyOf.userType; numExtensions = 0; @@ -276,7 +276,7 @@ TVariable* TVariable::clone() const } TFunction::TFunction(const TFunction& copyOf) : TSymbol(copyOf) -{ +{ for (unsigned int i = 0; i < copyOf.parameters.size(); ++i) { TParameter param; parameters.push_back(param); diff --git a/glslang/OSDependent/Windows/ossource.cpp b/glslang/OSDependent/Windows/ossource.cpp index 1d09fd38..5df8eff3 100644 --- a/glslang/OSDependent/Windows/ossource.cpp +++ b/glslang/OSDependent/Windows/ossource.cpp @@ -55,12 +55,12 @@ namespace glslang { 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) { - 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() { - DWORD dwIndex = TlsAlloc(); - if (dwIndex == TLS_OUT_OF_INDEXES) { - assert(0 && "OS_AllocTLSIndex(): Unable to allocate Thread Local Storage"); - return OS_INVALID_TLS_INDEX; - } + DWORD dwIndex = TlsAlloc(); + if (dwIndex == TLS_OUT_OF_INDEXES) { + assert(0 && "OS_AllocTLSIndex(): Unable to allocate Thread Local Storage"); + return OS_INVALID_TLS_INDEX; + } - return ToGenericTLSIndex(dwIndex); + return ToGenericTLSIndex(dwIndex); } bool OS_SetTLSValue(OS_TLSIndex nIndex, void *lpvValue) { - if (nIndex == OS_INVALID_TLS_INDEX) { - assert(0 && "OS_SetTLSValue(): Invalid TLS Index"); - return false; - } + if (nIndex == OS_INVALID_TLS_INDEX) { + assert(0 && "OS_SetTLSValue(): Invalid TLS Index"); + return false; + } - if (TlsSetValue(ToNativeTLSIndex(nIndex), lpvValue)) - return true; - else - return false; + if (TlsSetValue(ToNativeTLSIndex(nIndex), lpvValue)) + return true; + else + return false; } void* OS_GetTLSValue(OS_TLSIndex nIndex) { - assert(nIndex != OS_INVALID_TLS_INDEX); - return TlsGetValue(ToNativeTLSIndex(nIndex)); + assert(nIndex != OS_INVALID_TLS_INDEX); + return TlsGetValue(ToNativeTLSIndex(nIndex)); } bool OS_FreeTLSIndex(OS_TLSIndex nIndex) { - if (nIndex == OS_INVALID_TLS_INDEX) { - assert(0 && "OS_SetTLSValue(): Invalid TLS Index"); - return false; - } + if (nIndex == OS_INVALID_TLS_INDEX) { + assert(0 && "OS_SetTLSValue(): Invalid TLS Index"); + return false; + } - if (TlsFree(ToNativeTLSIndex(nIndex))) - return true; - else - return false; + if (TlsFree(ToNativeTLSIndex(nIndex))) + return true; + else + return false; } HANDLE GlobalLock; @@ -129,7 +129,7 @@ void ReleaseGlobalLock() unsigned int __stdcall EnterGenericThread (void* entry) { - return ((TThreadEntrypoint)entry)(0); + return ((TThreadEntrypoint)entry)(0); } void* OS_CreateThread(TThreadEntrypoint entry) diff --git a/hlsl/hlslGrammar.cpp b/hlsl/hlslGrammar.cpp index 3a422584..3de98536 100755 --- a/hlsl/hlslGrammar.cpp +++ b/hlsl/hlslGrammar.cpp @@ -274,11 +274,11 @@ bool HlslGrammar::acceptDeclaration(TIntermNode*& node) TType type; // 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 - // be possible to simultanously compile D3D10+ style shaders and DX9 shaders. If we want to compile DX9 - // 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 - // For that reason, this line is commented out + // DX9 shaders need to run through HLSL compiler (fxc) via a back compat mode, it isn't going to + // 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 + // 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 // if (acceptSamplerDeclarationDX9(type)) // return true; diff --git a/hlsl/hlslParseHelper.cpp b/hlsl/hlslParseHelper.cpp index fc926d74..c8348c51 100755 --- a/hlsl/hlslParseHelper.cpp +++ b/hlsl/hlslParseHelper.cpp @@ -998,7 +998,7 @@ void HlslParseContext::decomposeSampleMethods(const TSourceLoc& loc, TIntermType const TSampler& texSampler = texType.getSampler(); const TSamplerDim dim = texSampler.dim; - const int numArgs = (int) argAggregate->getSequence().size(); + const int numArgs = (int)argAggregate->getSequence().size(); int numDims = 0; @@ -1184,7 +1184,7 @@ void HlslParseContext::decomposeSampleMethods(const TSourceLoc& loc, TIntermType 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)); // Create texel fetch @@ -1228,7 +1228,7 @@ void HlslParseContext::decomposeSampleMethods(const TSourceLoc& loc, TIntermType TIntermTyped* argLod = argAggregate->getSequence()[3]->getAsTyped(); TIntermTyped* argOffset = nullptr; - const int numArgs = (int) argAggregate->getSequence().size(); + const int numArgs = (int)argAggregate->getSequence().size(); if (numArgs == 5) // offset, if present argOffset = argAggregate->getSequence()[4]->getAsTyped();