bool operator==(const TType& right) const
{
return sameElementType(right) &&
- (arraySizes == 0 && right.arraySizes == 0 ||
+ ((arraySizes == 0 && right.arraySizes == 0) ||
(arraySizes && right.arraySizes && arraySizes->sizes == right.arraySizes->sizes));
}
// Set up gl_FragData based on current array size.
if (version < FirstProfileVersion || profile == ECompatibilityProfile || (! ForwardCompatibility && profile != EEsProfile && version < 420)) {
TPrecisionQualifier pq = profile == EEsProfile ? EpqMedium : EpqNone;
- TType fragData(EbtFloat, EvqFragColor, 4);
+ TType fragData(EbtFloat, EvqFragColor, pq, 4);
TArraySizes* arraySizes = NewPoolTArraySizes();
arraySizes->setSize(resources.maxDrawBuffers);
fragData.setArraySizes(arraySizes);
version(v), profile(p), forwardCompatible(fc), messages(m),
contextPragma(true, false), loopNestingLevel(0), structNestingLevel(0),
tokensBeforeEOF(false),
- parsingBuiltins(pb), numErrors(0), afterEOF(false)
+ numErrors(0), parsingBuiltins(pb), afterEOF(false)
{
currentLoc.line = 1;
currentLoc.string = 0;
//
TStorageQualifier qualifier = variable->getType().getQualifier().storage;
if (! (qualifier == EvqTemporary || qualifier == EvqGlobal || qualifier == EvqConst ||
- qualifier == EvqUniform && profile != EEsProfile && version >= 120)) {
+ (qualifier == EvqUniform && profile != EEsProfile && version >= 120))) {
error(loc, " cannot initialize this type of qualifier ", variable->getType().getStorageQualifierString(), "");
return 0;
}
//
// Otherwise, skip out early.
- if (subset || newNode != node && newNode->getType() == type)
+ if (subset || (newNode != node && newNode->getType() == type))
return newNode;
// setAggregateOperator will insert a new node for the constructor, as needed.
{
TIntermTyped* typedNode;
TIntermConstantUnion* tempConstantNode = node->getAsConstantUnion();
- int arraySize = node->getType().getArraySize();
TType arrayElementType;
arrayElementType.shallowCopy(node->getType());
arrayElementType.dereference(); // TODO: arrays of arrays: shallow copy won't work if sharing same array structure and then doing a dereference
$$ = $2;\r
\r
if (! $$.qualifier.isInterpolation() && \r
- (parseContext.language == EShLangVertex && $$.qualifier.storage == EvqVaryingOut ||\r
- parseContext.language == EShLangFragment && $$.qualifier.storage == EvqVaryingIn))\r
+ ((parseContext.language == EShLangVertex && $$.qualifier.storage == EvqVaryingOut) ||\r
+ (parseContext.language == EShLangFragment && $$.qualifier.storage == EvqVaryingIn)))\r
$$.qualifier.smooth = true;\r
}\r
;\r
void OutputConstantUnion(TIntermConstantUnion* node, TIntermTraverser* it)
{
TOutputTraverser* oit = static_cast<TOutputTraverser*>(it);
- TInfoSink& out = oit->infoSink;
OutputTreeText(oit->infoSink, node, oit->depth);
oit->infoSink.debug << "Constant:\n";
(oit->index)++;
}
} else {
- int size, totalSize, matrixCols, matrixRows;
+ int size, totalSize, matrixRows;
bool isMatrix = false;
size = oit->size;
- matrixCols = oit->matrixCols;
matrixRows = oit->matrixRows;
isMatrix = oit->isMatrix;
totalSize = oit->index + size;
{
int hashloc, hashdelta, count;
int FoundEmptySlot = 0;
+#ifdef DUMP_TABLE
int collision[TPpContext::hashTableMaxCollisions + 1];
+#endif
hashloc = HashString(s) % atable->htable.size;
if (!Empty(&atable->htable, hashloc)) {
if (Match(&atable->htable, &atable->stable, s, hashloc))
return hashloc;
+#ifdef DUMP_TABLE
collision[0] = hashloc;
+#endif
hashdelta = HashString2(s);
count = 0;
while (count < TPpContext::hashTableMaxCollisions) {
break;
}
count++;
+#ifdef DUMP_TABLE
collision[count] = hashloc;
+#endif
}
if (! FoundEmptySlot) {
namespace glslang {
TPpContext::TPpContext(TParseContext& pc) :
- parseContext(pc), preamble(0), strings(0), notAVersionToken(false),
+ preamble(0), strings(0), notAVersionToken(false), parseContext(pc),
ScopeList(0), CurrentScope(0), GlobalScope(0)
{
InitAtomTable(&atomTable, 0);
void* OS_CreateThread(TThreadEntrypoint entry)
{
+ return 0;
}
void OS_WaitForAllThreads(void* threads, int numThreads)