зеркало из https://github.com/stride3d/xkslang.git
Make ES 100 gl_FragData be a mediump, and fix some warnings from g++.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23380 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
Родитель
e50441ad94
Коммит
c6b7e6350b
|
@ -771,7 +771,7 @@ public:
|
|||
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));
|
||||
}
|
||||
|
||||
|
|
|
@ -1654,7 +1654,7 @@ void IdentifyBuiltIns(int version, EProfile profile, EShLanguage language, TSymb
|
|||
// 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);
|
||||
|
|
|
@ -52,7 +52,7 @@ TParseContext::TParseContext(TSymbolTable& symt, TIntermediate& interm, bool pb,
|
|||
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;
|
||||
|
@ -2073,7 +2073,7 @@ TIntermNode* TParseContext::executeInitializer(TSourceLoc loc, TString& identifi
|
|||
//
|
||||
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;
|
||||
}
|
||||
|
@ -2290,7 +2290,7 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T
|
|||
//
|
||||
|
||||
// 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.
|
||||
|
@ -2672,7 +2672,6 @@ TIntermTyped* TParseContext::addConstArrayNode(int index, TIntermTyped* node, TS
|
|||
{
|
||||
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
|
||||
|
|
|
@ -1016,8 +1016,8 @@ fully_specified_type
|
|||
$$ = $2;
|
||||
|
||||
if (! $$.qualifier.isInterpolation() &&
|
||||
(parseContext.language == EShLangVertex && $$.qualifier.storage == EvqVaryingOut ||
|
||||
parseContext.language == EShLangFragment && $$.qualifier.storage == EvqVaryingIn))
|
||||
((parseContext.language == EShLangVertex && $$.qualifier.storage == EvqVaryingOut) ||
|
||||
(parseContext.language == EShLangFragment && $$.qualifier.storage == EvqVaryingIn)))
|
||||
$$.qualifier.smooth = true;
|
||||
}
|
||||
;
|
||||
|
|
|
@ -457,7 +457,6 @@ void OutputConstantUnion(TInfoSink& out, const TIntermTyped* node, const TConstU
|
|||
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";
|
||||
|
|
|
@ -130,10 +130,9 @@ void ParseConstantUnion(TIntermConstantUnion* node, TIntermTraverser* it)
|
|||
(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;
|
||||
|
|
|
@ -383,13 +383,17 @@ int FindHashLoc(TPpContext::AtomTable *atable, const char *s)
|
|||
{
|
||||
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) {
|
||||
|
@ -403,7 +407,9 @@ int FindHashLoc(TPpContext::AtomTable *atable, const char *s)
|
|||
break;
|
||||
}
|
||||
count++;
|
||||
#ifdef DUMP_TABLE
|
||||
collision[count] = hashloc;
|
||||
#endif
|
||||
}
|
||||
|
||||
if (! FoundEmptySlot) {
|
||||
|
|
|
@ -84,7 +84,7 @@ NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
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);
|
||||
|
|
|
@ -144,6 +144,7 @@ void ReleaseGlobalLock() { }
|
|||
|
||||
void* OS_CreateThread(TThreadEntrypoint entry)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void OS_WaitForAllThreads(void* threads, int numThreads)
|
||||
|
|
Загрузка…
Ссылка в новой задаче