OperandMemorySemantics,
OperandMemoryAccess,
OperandScope,
- OperandGroupOperation,
+ OperandGroupOperation,
OperandKernelEnqueueFlags,
OperandKernelProfilingInfo,
OperandCapability,
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;
};
//
#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 *) { }
pointer allocate(size_type n, const void*) {
return reinterpret_cast<pointer>(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<pointer>(getAllocator().allocate(n)); }
void construct(pointer p, const T& val) { new ((void *)p) T(val); }
haveReturnableObjectCode(false),
appAttributeBindings(0),
fixedAttributeBindings(0),
- excludedAttributes(0),
- excludedCount(0),
+ excludedAttributes(0),
+ excludedCount(0),
uniformBindings(0) { }
virtual TLinker* getAsLinker() { return this; }
virtual ~TLinker() { }
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; }
const ShBindingTable* appAttributeBindings;
const ShBindingTable* fixedAttributeBindings;
- const int* excludedAttributes;
- int excludedCount;
+ const int* excludedAttributes;
+ int excludedCount;
ShBindingTable* uniformBindings; // created by the linker
};
// 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"
//
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;
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())
TThreadMemoryPools* threadData = new TThreadMemoryPools();
threadData->threadPoolAllocator = threadPoolAllocator;
-
+
OS_SetTLSValue(PoolIndex, threadData);
}
TThreadMemoryPools* globalPools = static_cast<TThreadMemoryPools*>(OS_GetTLSValue(PoolIndex));
if (! globalPools)
return;
-
+
GetThreadPoolAllocator().popAll();
delete &GetThreadPoolAllocator();
delete globalPools;
TPoolAllocator::~TPoolAllocator()
{
- while (inUseList) {
- tHeader* next = inUseList->nextPage;
+ while (inUseList) {
+ tHeader* next = inUseList->nextPage;
inUseList->~tHeader();
delete [] reinterpret_cast<char*>(inUseList);
- inUseList = next;
- }
+ inUseList = next;
+ }
//
// Always delete the free list memory - it can't be being
}
TVariable::TVariable(const TVariable& copyOf) : TSymbol(copyOf)
-{
+{
type.deepCopy(copyOf.type);
userType = copyOf.userType;
numExtensions = 0;
}
TFunction::TFunction(const TFunction& copyOf) : TSymbol(copyOf)
-{
+{
for (unsigned int i = 0; i < copyOf.parameters.size(); ++i) {
TParameter param;
parameters.push_back(param);
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);
}
//
//
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 (TlsSetValue(ToNativeTLSIndex(nIndex), lpvValue))
- return true;
- else
- 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;
}
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 (TlsFree(ToNativeTLSIndex(nIndex)))
- return true;
- else
- 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;
}
HANDLE GlobalLock;
unsigned int __stdcall EnterGenericThread (void* entry)
{
- return ((TThreadEntrypoint)entry)(0);
+ return ((TThreadEntrypoint)entry)(0);
}
void* OS_CreateThread(TThreadEntrypoint entry)
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;
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;
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
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();