Non-Functional: Whitespace, comments, replace accidentally deleted comment.
- fixed ParseHelper.cpp newlines (crlf -> lf) - removed trailing white space in most source files - fix some spelling issues - extra blank lines - tabs to spaces - replace #include comment about no location
This commit is contained in:
parent
3dd32293f4
commit
ecba76fe73
@ -439,7 +439,6 @@ spv::Decoration TranslateNoContractionDecoration(const glslang::TQualifier& qual
|
|||||||
return spv::DecorationMax;
|
return spv::DecorationMax;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Translate a glslang built-in variable to a SPIR-V built in decoration. Also generate
|
// Translate a glslang built-in variable to a SPIR-V built in decoration. Also generate
|
||||||
// associated capabilities when required. For some built-in variables, a capability
|
// associated capabilities when required. For some built-in variables, a capability
|
||||||
// is generated only when using the variable in an executable instruction, but not when
|
// is generated only when using the variable in an executable instruction, but not when
|
||||||
@ -2139,7 +2138,6 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty
|
|||||||
return spvType;
|
return spvType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Do full recursive conversion of a glslang structure (or block) type to a SPIR-V Id.
|
// Do full recursive conversion of a glslang structure (or block) type to a SPIR-V Id.
|
||||||
// explicitLayout can be kept the same throughout the hierarchical recursive walk.
|
// explicitLayout can be kept the same throughout the hierarchical recursive walk.
|
||||||
// Mutually recursive with convertGlslangToSpvType().
|
// Mutually recursive with convertGlslangToSpvType().
|
||||||
|
@ -286,7 +286,6 @@ namespace spv {
|
|||||||
return literal;
|
return literal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void spirvbin_t::applyMap()
|
void spirvbin_t::applyMap()
|
||||||
{
|
{
|
||||||
msg(3, 2, std::string("Applying map: "));
|
msg(3, 2, std::string("Applying map: "));
|
||||||
@ -300,7 +299,6 @@ namespace spv {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Find free IDs for anything we haven't mapped
|
// Find free IDs for anything we haven't mapped
|
||||||
void spirvbin_t::mapRemainder()
|
void spirvbin_t::mapRemainder()
|
||||||
{
|
{
|
||||||
@ -462,7 +460,6 @@ namespace spv {
|
|||||||
error("bad schema, must be 0");
|
error("bad schema, must be 0");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int spirvbin_t::processInstruction(unsigned word, instfn_t instFn, idfn_t idFn)
|
int spirvbin_t::processInstruction(unsigned word, instfn_t instFn, idfn_t idFn)
|
||||||
{
|
{
|
||||||
const auto instructionStart = word;
|
const auto instructionStart = word;
|
||||||
@ -1079,7 +1076,6 @@ namespace spv {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef NOTDEF
|
#ifdef NOTDEF
|
||||||
bool spirvbin_t::matchType(const spirvbin_t::globaltypes_t& globalTypes, spv::Id lt, spv::Id gt) const
|
bool spirvbin_t::matchType(const spirvbin_t::globaltypes_t& globalTypes, spv::Id lt, spv::Id gt) const
|
||||||
{
|
{
|
||||||
@ -1139,7 +1135,6 @@ namespace spv {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Look for an equivalent type in the globalTypes map
|
// Look for an equivalent type in the globalTypes map
|
||||||
spv::Id spirvbin_t::findType(const spirvbin_t::globaltypes_t& globalTypes, spv::Id lt) const
|
spv::Id spirvbin_t::findType(const spirvbin_t::globaltypes_t& globalTypes, spv::Id lt) const
|
||||||
{
|
{
|
||||||
@ -1261,7 +1256,6 @@ namespace spv {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Strip a single binary by removing ranges given in stripRange
|
// Strip a single binary by removing ranges given in stripRange
|
||||||
void spirvbin_t::strip()
|
void spirvbin_t::strip()
|
||||||
{
|
{
|
||||||
|
@ -1936,7 +1936,6 @@ Id Builder::createMatrixConstructor(Decoration precision, const std::vector<Id>&
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Step 2: Construct a matrix from that array.
|
// Step 2: Construct a matrix from that array.
|
||||||
// First make the column vectors, then make the matrix.
|
// First make the column vectors, then make the matrix.
|
||||||
|
|
||||||
|
@ -311,7 +311,6 @@ namespace {
|
|||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
|
|
||||||
int main(int argc, char** argv)
|
int main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
std::vector<std::string> inputFile;
|
std::vector<std::string> inputFile;
|
||||||
|
@ -245,7 +245,6 @@ private:
|
|||||||
TPoolAllocator(const TPoolAllocator&); // don't allow default copy constructor
|
TPoolAllocator(const TPoolAllocator&); // don't allow default copy constructor
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// There could potentially be many pools with pops happening at
|
// There could potentially be many pools with pops happening at
|
||||||
// different times. But a simple use is to have a global pop
|
// different times. But a simple use is to have a global pop
|
||||||
|
@ -42,7 +42,6 @@
|
|||||||
// This should not be included by driver code.
|
// This should not be included by driver code.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
#define SH_EXPORTING
|
#define SH_EXPORTING
|
||||||
#include "../Public/ShaderLang.h"
|
#include "../Public/ShaderLang.h"
|
||||||
#include "../MachineIndependent/Versions.h"
|
#include "../MachineIndependent/Versions.h"
|
||||||
|
@ -1601,7 +1601,6 @@ public:
|
|||||||
p += snprintf(p, end - p, "passthrough ");
|
p += snprintf(p, end - p, "passthrough ");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
p += snprintf(p, end - p, ") ");
|
p += snprintf(p, end - p, ") ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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 "Overload400-PrecQual.1744"
|
#define GLSLANG_REVISION "Overload400-PrecQual.1747"
|
||||||
#define GLSLANG_DATE "05-Jan-2017"
|
#define GLSLANG_DATE "06-Jan-2017"
|
||||||
|
@ -103,7 +103,6 @@ TBuiltIns::~TBuiltIns()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Add all context-independent built-in functions and variables that are present
|
// Add all context-independent built-in functions and variables that are present
|
||||||
// for the given version and profile. Share common ones across stages, otherwise
|
// for the given version and profile. Share common ones across stages, otherwise
|
||||||
@ -2524,7 +2523,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||||||
"float quadraticAttenuation;"// K2
|
"float quadraticAttenuation;"// K2
|
||||||
"};"
|
"};"
|
||||||
|
|
||||||
|
|
||||||
"struct gl_LightModelParameters {"
|
"struct gl_LightModelParameters {"
|
||||||
"vec4 ambient;" // Acs
|
"vec4 ambient;" // Acs
|
||||||
"};"
|
"};"
|
||||||
@ -2827,7 +2825,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
//
|
//
|
||||||
// Define the interface to the tessellation control shader.
|
// Define the interface to the tessellation control shader.
|
||||||
@ -3637,7 +3634,6 @@ void TBuiltIns::addSamplingFunctions(TSampler sampler, TString& typeName, int ve
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Helper function for add2ndGenerationSamplingImaging(),
|
// Helper function for add2ndGenerationSamplingImaging(),
|
||||||
// when adding context-independent built-in functions.
|
// when adding context-independent built-in functions.
|
||||||
@ -4137,7 +4133,6 @@ void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProf
|
|||||||
s.append("\n");
|
s.append("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// compute
|
// compute
|
||||||
if ((profile == EEsProfile && version >= 310) || (profile != EEsProfile && version >= 420)) {
|
if ((profile == EEsProfile && version >= 310) || (profile != EEsProfile && version >= 420)) {
|
||||||
snprintf(builtInConstant, maxSize, "const ivec3 gl_MaxComputeWorkGroupCount = ivec3(%d,%d,%d);", resources.maxComputeWorkGroupCountX,
|
snprintf(builtInConstant, maxSize, "const ivec3 gl_MaxComputeWorkGroupCount = ivec3(%d,%d,%d);", resources.maxComputeWorkGroupCountX,
|
||||||
|
@ -107,7 +107,6 @@ protected:
|
|||||||
int dimMap[EsdNumDims];
|
int dimMap[EsdNumDims];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
} // end namespace glslang
|
} // end namespace glslang
|
||||||
|
|
||||||
#endif // _INITIALIZE_INCLUDED_
|
#endif // _INITIALIZE_INCLUDED_
|
||||||
|
@ -1245,7 +1245,6 @@ TIntermNode* TIntermediate::addSelection(TIntermTyped* cond, TIntermNodePair nod
|
|||||||
return node;
|
return node;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
TIntermTyped* TIntermediate::addComma(TIntermTyped* left, TIntermTyped* right, const TSourceLoc& loc)
|
TIntermTyped* TIntermediate::addComma(TIntermTyped* left, TIntermTyped* right, const TSourceLoc& loc)
|
||||||
{
|
{
|
||||||
// However, the lowest precedence operators of the sequence operator ( , ) and the assignment operators
|
// However, the lowest precedence operators of the sequence operator ( , ) and the assignment operators
|
||||||
@ -2304,7 +2303,6 @@ bool TIntermediate::promoteAggregate(TIntermAggregate& node)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void TIntermBinary::updatePrecision()
|
void TIntermBinary::updatePrecision()
|
||||||
{
|
{
|
||||||
#ifdef AMD_EXTENSIONS
|
#ifdef AMD_EXTENSIONS
|
||||||
|
@ -206,7 +206,6 @@ void TAllocation::checkGuardBlock(unsigned char*, unsigned char, const char*) co
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void TPoolAllocator::push()
|
void TPoolAllocator::push()
|
||||||
{
|
{
|
||||||
tAllocState state = { currentPageOffset, inUseList };
|
tAllocState state = { currentPageOffset, inUseList };
|
||||||
@ -334,7 +333,6 @@ void* TPoolAllocator::allocate(size_t numBytes)
|
|||||||
return initializeAllocation(inUseList, ret, numBytes);
|
return initializeAllocation(inUseList, ret, numBytes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Check all allocations in a list for damage by calling check on each.
|
// Check all allocations in a list for damage by calling check on each.
|
||||||
//
|
//
|
||||||
|
@ -1032,7 +1032,6 @@ bool PreprocessDeferred(
|
|||||||
false, includer);
|
false, includer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// do a partial compile on the given strings for a single compilation unit
|
// do a partial compile on the given strings for a single compilation unit
|
||||||
// for a potential deferred link into a single stage (and deferred full compile of that
|
// for a potential deferred link into a single stage (and deferred full compile of that
|
||||||
@ -1072,7 +1071,6 @@ bool CompileDeferred(
|
|||||||
|
|
||||||
} // end anonymous namespace for local functions
|
} // end anonymous namespace for local functions
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// ShInitialize() should be called exactly once per process, not per thread.
|
// ShInitialize() should be called exactly once per process, not per thread.
|
||||||
//
|
//
|
||||||
@ -1265,7 +1263,6 @@ int ShLinkExt(
|
|||||||
if (base->getAsCompiler())
|
if (base->getAsCompiler())
|
||||||
cObjects.push_back(base->getAsCompiler());
|
cObjects.push_back(base->getAsCompiler());
|
||||||
|
|
||||||
|
|
||||||
if (cObjects[i] == 0)
|
if (cObjects[i] == 0)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
//
|
//
|
||||||
// Travarse a tree of constants to create a single folded constant.
|
// Traverse a tree of constants to create a single folded constant.
|
||||||
// It should only be used when the whole tree is known to be constant.
|
// It should only be used when the whole tree is known to be constant.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
@ -617,6 +617,7 @@ int TPpContext::CPPinclude(TPpToken* ppToken)
|
|||||||
epilogue << (res->file_data[res->file_length - 1] == '\n'? "" : "\n") <<
|
epilogue << (res->file_data[res->file_length - 1] == '\n'? "" : "\n") <<
|
||||||
"#line " << directiveLoc.line + forNextLine << " " << directiveLoc.getStringNameOrNum() << "\n";
|
"#line " << directiveLoc.line + forNextLine << " " << directiveLoc.getStringNameOrNum() << "\n";
|
||||||
pushInput(new TokenizableIncludeFile(directiveLoc, prologue.str(), res, epilogue.str(), this));
|
pushInput(new TokenizableIncludeFile(directiveLoc, prologue.str(), res, epilogue.str(), this));
|
||||||
|
// There's no "current" location anymore.
|
||||||
parseContext.setCurrentColumn(0);
|
parseContext.setCurrentColumn(0);
|
||||||
} else {
|
} else {
|
||||||
// things are okay, but there is nothing to process
|
// things are okay, but there is nothing to process
|
||||||
|
@ -63,7 +63,6 @@
|
|||||||
// there wasn't exactly one entry point.
|
// there wasn't exactly one entry point.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
namespace glslang {
|
namespace glslang {
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -355,7 +354,6 @@ public:
|
|||||||
return blockIndex;
|
return blockIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Are we at a level in a dereference chain at which individual active uniform queries are made?
|
// Are we at a level in a dereference chain at which individual active uniform queries are made?
|
||||||
bool isReflectionGranularity(const TType& type)
|
bool isReflectionGranularity(const TType& type)
|
||||||
{
|
{
|
||||||
@ -694,7 +692,6 @@ void TReflectionTraverser::visitSymbol(TIntermSymbol* base)
|
|||||||
addAttribute(*base);
|
addAttribute(*base);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Implement TReflection methods.
|
// Implement TReflection methods.
|
||||||
//
|
//
|
||||||
|
@ -56,10 +56,9 @@ namespace glslang {
|
|||||||
//
|
//
|
||||||
static void DetachThreadLinux(void *)
|
static void DetachThreadLinux(void *)
|
||||||
{
|
{
|
||||||
DetachThread();
|
DetachThread();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Registers cleanup handler, sets cancel type and state, and executes the thread specific
|
// Registers cleanup handler, sets cancel type and state, and executes the thread specific
|
||||||
// cleanup handler. This function will be called in the Standalone.cpp for regression
|
// cleanup handler. This function will be called in the Standalone.cpp for regression
|
||||||
@ -69,104 +68,102 @@ static void DetachThreadLinux(void *)
|
|||||||
void OS_CleanupThreadData(void)
|
void OS_CleanupThreadData(void)
|
||||||
{
|
{
|
||||||
#ifdef __ANDROID__
|
#ifdef __ANDROID__
|
||||||
DetachThreadLinux(NULL);
|
DetachThreadLinux(NULL);
|
||||||
#else
|
#else
|
||||||
int old_cancel_state, old_cancel_type;
|
int old_cancel_state, old_cancel_type;
|
||||||
void *cleanupArg = NULL;
|
void *cleanupArg = NULL;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Set thread cancel state and push cleanup handler.
|
// Set thread cancel state and push cleanup handler.
|
||||||
//
|
//
|
||||||
pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, &old_cancel_state);
|
pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, &old_cancel_state);
|
||||||
pthread_cleanup_push(DetachThreadLinux, (void *) cleanupArg);
|
pthread_cleanup_push(DetachThreadLinux, (void *) cleanupArg);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Put the thread in deferred cancellation mode.
|
// Put the thread in deferred cancellation mode.
|
||||||
//
|
//
|
||||||
pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, &old_cancel_type);
|
pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, &old_cancel_type);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Pop cleanup handler and execute it prior to unregistering the cleanup handler.
|
// Pop cleanup handler and execute it prior to unregistering the cleanup handler.
|
||||||
//
|
//
|
||||||
pthread_cleanup_pop(1);
|
pthread_cleanup_pop(1);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Restore the thread's previous cancellation mode.
|
// Restore the thread's previous cancellation mode.
|
||||||
//
|
//
|
||||||
pthread_setcanceltype(old_cancel_state, NULL);
|
pthread_setcanceltype(old_cancel_state, NULL);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Thread Local Storage Operations
|
// Thread Local Storage Operations
|
||||||
//
|
//
|
||||||
inline OS_TLSIndex PthreadKeyToTLSIndex(pthread_key_t key)
|
inline OS_TLSIndex PthreadKeyToTLSIndex(pthread_key_t key)
|
||||||
{
|
{
|
||||||
return (OS_TLSIndex)((uintptr_t)key + 1);
|
return (OS_TLSIndex)((uintptr_t)key + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline pthread_key_t TLSIndexToPthreadKey(OS_TLSIndex nIndex)
|
inline pthread_key_t TLSIndexToPthreadKey(OS_TLSIndex nIndex)
|
||||||
{
|
{
|
||||||
return (pthread_key_t)((uintptr_t)nIndex - 1);
|
return (pthread_key_t)((uintptr_t)nIndex - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
OS_TLSIndex OS_AllocTLSIndex()
|
OS_TLSIndex OS_AllocTLSIndex()
|
||||||
{
|
{
|
||||||
pthread_key_t pPoolIndex;
|
pthread_key_t pPoolIndex;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Create global pool key.
|
// Create global pool key.
|
||||||
//
|
//
|
||||||
if ((pthread_key_create(&pPoolIndex, NULL)) != 0) {
|
if ((pthread_key_create(&pPoolIndex, NULL)) != 0) {
|
||||||
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;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return PthreadKeyToTLSIndex(pPoolIndex);
|
return PthreadKeyToTLSIndex(pPoolIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
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 (pthread_setspecific(TLSIndexToPthreadKey(nIndex), lpvValue) == 0)
|
if (pthread_setspecific(TLSIndexToPthreadKey(nIndex), lpvValue) == 0)
|
||||||
return true;
|
return true;
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void* OS_GetTLSValue(OS_TLSIndex nIndex)
|
void* OS_GetTLSValue(OS_TLSIndex nIndex)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
// This function should return 0 if nIndex is invalid.
|
// This function should return 0 if nIndex is invalid.
|
||||||
//
|
//
|
||||||
assert(nIndex != OS_INVALID_TLS_INDEX);
|
assert(nIndex != OS_INVALID_TLS_INDEX);
|
||||||
return pthread_getspecific(TLSIndexToPthreadKey(nIndex));
|
return pthread_getspecific(TLSIndexToPthreadKey(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;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Delete the global pool key.
|
// Delete the global pool key.
|
||||||
//
|
//
|
||||||
if (pthread_key_delete(TLSIndexToPthreadKey(nIndex)) == 0)
|
if (pthread_key_delete(TLSIndexToPthreadKey(nIndex)) == 0)
|
||||||
return true;
|
return true;
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
pthread_mutex_t gMutex;
|
pthread_mutex_t gMutex;
|
||||||
}
|
}
|
||||||
|
|
||||||
void InitGlobalLock()
|
void InitGlobalLock()
|
||||||
|
@ -77,7 +77,6 @@ OS_TLSIndex OS_AllocTLSIndex()
|
|||||||
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) {
|
||||||
|
@ -269,7 +269,6 @@ bool HlslGrammar::acceptSamplerDeclarationDX9(TType& /*type*/)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// declaration
|
// declaration
|
||||||
// : sampler_declaration_dx9 post_decls SEMICOLON
|
// : sampler_declaration_dx9 post_decls SEMICOLON
|
||||||
// | fully_specified_type declarator_list SEMICOLON
|
// | fully_specified_type declarator_list SEMICOLON
|
||||||
@ -1099,7 +1098,6 @@ bool HlslGrammar::acceptTextureType(TType& type)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// If token is for a type, update 'type' with the type information,
|
// If token is for a type, update 'type' with the type information,
|
||||||
// and return true and advance.
|
// and return true and advance.
|
||||||
// Otherwise, return false, and don't advance
|
// Otherwise, return false, and don't advance
|
||||||
@ -1261,7 +1259,6 @@ bool HlslGrammar::acceptType(TType& type)
|
|||||||
new(&type) TType(EbtUint, EvqTemporary, 4);
|
new(&type) TType(EbtUint, EvqTemporary, 4);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
case EHTokBool:
|
case EHTokBool:
|
||||||
new(&type) TType(EbtBool);
|
new(&type) TType(EbtBool);
|
||||||
break;
|
break;
|
||||||
@ -1814,7 +1811,6 @@ bool HlslGrammar::acceptFunctionParameters(TFunction& function)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// default_parameter_declaration
|
// default_parameter_declaration
|
||||||
// : EQUAL conditional_expression
|
// : EQUAL conditional_expression
|
||||||
// : EQUAL initializer
|
// : EQUAL initializer
|
||||||
@ -1837,7 +1833,7 @@ bool HlslGrammar::acceptDefaultParameterDeclaration(const TType& type, TIntermTy
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
TIntermTyped* arguments = nullptr;
|
TIntermTyped* arguments = nullptr;
|
||||||
for (int i=0; i<int(node->getAsAggregate()->getSequence().size()); i++)
|
for (int i = 0; i < int(node->getAsAggregate()->getSequence().size()); i++)
|
||||||
parseContext.handleFunctionArgument(constructor, arguments, node->getAsAggregate()->getSequence()[i]->getAsTyped());
|
parseContext.handleFunctionArgument(constructor, arguments, node->getAsAggregate()->getSequence()[i]->getAsTyped());
|
||||||
|
|
||||||
node = parseContext.handleFunctionCall(token.loc, constructor, node);
|
node = parseContext.handleFunctionCall(token.loc, constructor, node);
|
||||||
|
@ -1216,7 +1216,6 @@ bool HlslParseContext::wasSplit(const TIntermTyped* node) const
|
|||||||
wasSplit(node->getAsSymbolNode()->getId());
|
wasSplit(node->getAsSymbolNode()->getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Turn an access into an aggregate that was flattened to instead be
|
// Turn an access into an aggregate that was flattened to instead be
|
||||||
// an access to the individual variable the member was flattened to.
|
// an access to the individual variable the member was flattened to.
|
||||||
// Assumes shouldFlatten() or equivalent was called first.
|
// Assumes shouldFlatten() or equivalent was called first.
|
||||||
@ -1299,7 +1298,6 @@ void HlslParseContext::splitAccessArray(const TSourceLoc& loc, TIntermTyped* bas
|
|||||||
builtInIoIndex = index;
|
builtInIoIndex = index;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Turn an access into an struct that was split to instead be an
|
// Turn an access into an struct that was split to instead be an
|
||||||
// access to either the modified structure, or a direct reference to
|
// access to either the modified structure, or a direct reference to
|
||||||
// one of the split member variables.
|
// one of the split member variables.
|
||||||
@ -1436,7 +1434,6 @@ TFunction& HlslParseContext::handleFunctionDeclarator(const TSourceLoc& loc, TFu
|
|||||||
return function;
|
return function;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Add interstage IO variables to the linkage in canonical order.
|
// Add interstage IO variables to the linkage in canonical order.
|
||||||
void HlslParseContext::addInterstageIoToLinkage()
|
void HlslParseContext::addInterstageIoToLinkage()
|
||||||
{
|
{
|
||||||
@ -3504,7 +3501,6 @@ void HlslParseContext::handleSemantic(TSourceLoc loc, TQualifier& qualifier, con
|
|||||||
// stage, it would just be ignored as it is likely there as part of an output struct from one stage
|
// stage, it would just be ignored as it is likely there as part of an output struct from one stage
|
||||||
// to the next
|
// to the next
|
||||||
|
|
||||||
|
|
||||||
bool bParseDX9 = false;
|
bool bParseDX9 = false;
|
||||||
if (bParseDX9) {
|
if (bParseDX9) {
|
||||||
if (semanticUpperCase == "PSIZE")
|
if (semanticUpperCase == "PSIZE")
|
||||||
@ -3794,7 +3790,6 @@ void HlslParseContext::globalCheck(const TSourceLoc& loc, const char* token)
|
|||||||
error(loc, "not allowed in nested scope", token, "");
|
error(loc, "not allowed in nested scope", token, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool HlslParseContext::builtInName(const TString& /*identifier*/)
|
bool HlslParseContext::builtInName(const TString& /*identifier*/)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@ -6288,5 +6283,4 @@ void HlslParseContext::finish()
|
|||||||
TParseContextBase::finish();
|
TParseContextBase::finish();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
} // end namespace glslang
|
} // end namespace glslang
|
||||||
|
@ -195,7 +195,6 @@ inline bool IsEndOfArg(const char* arg)
|
|||||||
return arg == nullptr || *arg == '\0' || *arg == ',';
|
return arg == nullptr || *arg == '\0' || *arg == ',';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// If this is a fixed vector size, such as V3, return the size. Else return 0.
|
// If this is a fixed vector size, such as V3, return the size. Else return 0.
|
||||||
int FixedVecSize(const char* arg)
|
int FixedVecSize(const char* arg)
|
||||||
{
|
{
|
||||||
@ -208,7 +207,6 @@ int FixedVecSize(const char* arg)
|
|||||||
return 0; // none found.
|
return 0; // none found.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Create and return a type name. This is done in GLSL, not HLSL conventions, until such
|
// Create and return a type name. This is done in GLSL, not HLSL conventions, until such
|
||||||
// time as builtins are parsed using the HLSL parser.
|
// time as builtins are parsed using the HLSL parser.
|
||||||
//
|
//
|
||||||
@ -389,7 +387,6 @@ inline bool IsValid(const char* cname, char retOrder, char retType, char argOrde
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// return position of end of argument specifier
|
// return position of end of argument specifier
|
||||||
inline const char* FindEndOfArg(const char* arg)
|
inline const char* FindEndOfArg(const char* arg)
|
||||||
{
|
{
|
||||||
@ -433,7 +430,6 @@ TBuiltInParseablesHlsl::TBuiltInParseablesHlsl()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Handle creation of mat*mat specially, since it doesn't fall conveniently out of
|
// Handle creation of mat*mat specially, since it doesn't fall conveniently out of
|
||||||
// the generic prototype creation code below.
|
// the generic prototype creation code below.
|
||||||
@ -476,7 +472,6 @@ void TBuiltInParseablesHlsl::createMatTimesMat()
|
|||||||
|
|
||||||
s.append(");\n"); // close paren
|
s.append(");\n"); // close paren
|
||||||
|
|
||||||
|
|
||||||
// Create V*M
|
// Create V*M
|
||||||
AppendTypeName(s, "V", "F", xCols, 1); // add return type
|
AppendTypeName(s, "V", "F", xCols, 1); // add return type
|
||||||
s.append(" "); // space between type and name
|
s.append(" "); // space between type and name
|
||||||
@ -988,7 +983,6 @@ void TBuiltInParseablesHlsl::initialize(const TBuiltInResource& /*resources*/, i
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Finish adding/processing context-independent built-in symbols.
|
// Finish adding/processing context-independent built-in symbols.
|
||||||
// 1) Programmatically add symbols that could not be added by simple text strings above.
|
// 1) Programmatically add symbols that could not be added by simple text strings above.
|
||||||
@ -1179,5 +1173,4 @@ void TBuiltInParseablesHlsl::identifyBuiltIns(int /*version*/, EProfile /*profil
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
} // end namespace glslang
|
} // end namespace glslang
|
||||||
|
@ -316,7 +316,6 @@ void HlslScanContext::fillInKeywordMap()
|
|||||||
(*KeywordMap)["RWTexture3D"] = EHTokRWTexture3d;
|
(*KeywordMap)["RWTexture3D"] = EHTokRWTexture3d;
|
||||||
(*KeywordMap)["RWBuffer"] = EHTokRWBuffer;
|
(*KeywordMap)["RWBuffer"] = EHTokRWBuffer;
|
||||||
|
|
||||||
|
|
||||||
(*KeywordMap)["struct"] = EHTokStruct;
|
(*KeywordMap)["struct"] = EHTokStruct;
|
||||||
(*KeywordMap)["cbuffer"] = EHTokCBuffer;
|
(*KeywordMap)["cbuffer"] = EHTokCBuffer;
|
||||||
(*KeywordMap)["tbuffer"] = EHTokTBuffer;
|
(*KeywordMap)["tbuffer"] = EHTokTBuffer;
|
||||||
|
@ -252,7 +252,6 @@ enum EHlslTokenClass {
|
|||||||
EHTokRWTexture3d,
|
EHTokRWTexture3d,
|
||||||
EHTokRWBuffer,
|
EHTokRWBuffer,
|
||||||
|
|
||||||
|
|
||||||
// variable, user type, ...
|
// variable, user type, ...
|
||||||
EHTokIdentifier,
|
EHTokIdentifier,
|
||||||
EHTokTypeName,
|
EHTokTypeName,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user