Have non-ES profiles always use EpqNone (no precision qualifier) rather than using highp. This keeps precision qualifiers out of error messages, IL dumps, etc., and avoids the precision propagation algorithm.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20364 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
parent
e406f1c71c
commit
59ddbafb62
@ -836,8 +836,10 @@ bool TIntermBinary::promote(TInfoSink& infoSink)
|
||||
// Fix precision qualifiers
|
||||
if (right->getQualifier().precision > getQualifier().precision)
|
||||
getQualifier().precision = right->getQualifier().precision;
|
||||
if (getQualifier().precision != EpqNone) {
|
||||
left->propagatePrecision(getQualifier().precision);
|
||||
right->propagatePrecision(getQualifier().precision);
|
||||
}
|
||||
|
||||
//
|
||||
// Array operations.
|
||||
@ -1125,7 +1127,8 @@ void TIntermTyped::propagatePrecision(TPrecisionQualifier newPrecision)
|
||||
// comma operator: just through the last operand
|
||||
// ":?" and ",": where is this triggered?
|
||||
// built-in function calls: how much to propagate to arguments?
|
||||
// performance: don't do this for desktop profiles
|
||||
// length()?
|
||||
// indexing?
|
||||
}
|
||||
|
||||
bool CompareStructure(const TType& leftNodeType, constUnion* rightUnionArray, constUnion* leftUnionArray)
|
||||
|
@ -55,11 +55,7 @@ TParseContext::TParseContext(TSymbolTable& symt, TIntermediate& interm, EShLangu
|
||||
// Default precisions for version 110, to be overridden for
|
||||
// other versions/profiles/stage combinations
|
||||
for (int type = 0; type < EbtNumTypes; ++type)
|
||||
defaultPrecision[type] = EpqHigh;
|
||||
|
||||
defaultPrecision[EbtVoid] = EpqNone;
|
||||
defaultPrecision[EbtDouble] = EpqNone;
|
||||
defaultPrecision[EbtBool] = EpqNone;
|
||||
defaultPrecision[type] = EpqNone;
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -734,9 +734,6 @@ void SetVersion(int version)
|
||||
parseContext.version = version;
|
||||
|
||||
if (version == 100 || version == 300) {
|
||||
for (int type = 0; type < EbtNumTypes; ++type)
|
||||
parseContext.defaultPrecision[type] = EpqNone;
|
||||
|
||||
if (parseContext.language == EShLangVertex) {
|
||||
parseContext.defaultPrecision[EbtInt] = EpqHigh;
|
||||
parseContext.defaultPrecision[EbtFloat] = EpqHigh;
|
||||
|
@ -2442,16 +2442,19 @@ precision_qualifier
|
||||
: HIGH_PRECISION {
|
||||
parseContext.profileRequires($1.line, ENoProfile, 130, 0, "highp precision qualifier");
|
||||
$$.init($1.line);
|
||||
if (parseContext.profile == EEsProfile)
|
||||
$$.qualifier.precision = EpqHigh;
|
||||
}
|
||||
| MEDIUM_PRECISION {
|
||||
parseContext.profileRequires($1.line, ENoProfile, 130, 0, "mediump precision qualifier");
|
||||
$$.init($1.line);
|
||||
if (parseContext.profile == EEsProfile)
|
||||
$$.qualifier.precision = EpqMedium;
|
||||
}
|
||||
| LOW_PRECISION {
|
||||
parseContext.profileRequires($1.line, ENoProfile, 130, 0, "lowp precision qualifier");
|
||||
$$.init($1.line);
|
||||
if (parseContext.profile == EEsProfile)
|
||||
$$.qualifier.precision = EpqLow;
|
||||
}
|
||||
;
|
||||
|
Loading…
x
Reference in New Issue
Block a user