Establish desktop completeness through version 1.50. (gl_MaxVaryingFloats, implicit-cconversion safety, cube-sampler-array fix, add tests)
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@26253 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
parent
447c65c978
commit
e96ee859a8
15 changed files with 246 additions and 36 deletions
|
|
@ -1423,7 +1423,7 @@ void TBuiltIns::initialize(int version, EProfile profile)
|
|||
if (version >= 130)
|
||||
add2ndGenerationSamplingImaging(version, profile);
|
||||
|
||||
//printf("%s\n", commonBuiltins.c_str();
|
||||
// printf("%s\n", commonBuiltins.c_str());
|
||||
}
|
||||
|
||||
//
|
||||
|
|
@ -1914,8 +1914,10 @@ void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProf
|
|||
snprintf(builtInConstant, maxSize, "const int gl_MaxVertexUniformComponents = %d;", resources.maxVertexUniformComponents);
|
||||
s.append(builtInConstant);
|
||||
|
||||
snprintf(builtInConstant, maxSize, "const int gl_MaxVaryingFloats = %d;", resources.maxVaryingFloats);
|
||||
s.append(builtInConstant);
|
||||
if (version < 150 || ARBCompatibility) {
|
||||
snprintf(builtInConstant, maxSize, "const int gl_MaxVaryingFloats = %d;", resources.maxVaryingFloats);
|
||||
s.append(builtInConstant);
|
||||
}
|
||||
|
||||
snprintf(builtInConstant, maxSize, "const int gl_MaxFragmentUniformComponents = %d;", resources.maxFragmentUniformComponents);
|
||||
s.append(builtInConstant);
|
||||
|
|
|
|||
|
|
@ -368,7 +368,7 @@ TIntermTyped* TIntermediate::setAggregateOperator(TIntermNode* node, TOperator o
|
|||
}
|
||||
|
||||
//
|
||||
// Convert the node's type to the given type, as allowed by the operation involved 'op'.
|
||||
// Convert the node's type to the given type, as allowed by the operation involved: 'op'.
|
||||
// For implicit conversions, 'op' is not the requested conversion, it is the explicit
|
||||
// operation requiring the implicit conversion.
|
||||
//
|
||||
|
|
@ -384,9 +384,13 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt
|
|||
//
|
||||
switch (node->getBasicType()) {
|
||||
case EbtVoid:
|
||||
case EbtSampler:
|
||||
return 0;
|
||||
default: break;
|
||||
case EbtSampler:
|
||||
if (op != EOpFunctionCall)
|
||||
return 0;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
//
|
||||
|
|
@ -450,6 +454,7 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt
|
|||
case EOpMatrixTimesVector:
|
||||
case EOpMatrixTimesScalar:
|
||||
|
||||
case EOpFunctionCall:
|
||||
case EOpAssign:
|
||||
case EOpAddAssign:
|
||||
case EOpSubAssign:
|
||||
|
|
|
|||
|
|
@ -1078,11 +1078,13 @@ void TParseContext::addInputArgumentConversions(const TFunction& function, TInte
|
|||
if (function[i].type->getQualifier().isParamInput()) {
|
||||
// In-qualified arguments just need an extra node added above the argument to
|
||||
// convert to the correct type.
|
||||
arg = intermediate.addConversion(EOpAssign, *function[i].type, arg);
|
||||
if (aggregate)
|
||||
aggregate->getSequence()[i] = arg;
|
||||
else
|
||||
arguments = arg;
|
||||
arg = intermediate.addConversion(EOpFunctionCall, *function[i].type, arg);
|
||||
if (arg) {
|
||||
if (aggregate)
|
||||
aggregate->getSequence()[i] = arg;
|
||||
else
|
||||
arguments = arg;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -377,17 +377,24 @@ bool DeduceVersionProfile(TInfoSink& infoSink, EShLanguage stage, bool versionNo
|
|||
infoSink.info.message(EPrefixError, "#version: statement must appear first in es-profile shader; before comments or newlines");
|
||||
}
|
||||
|
||||
// A metecheck on the condition of the compiler itself...
|
||||
// A metacheck on the condition of the compiler itself...
|
||||
switch (version) {
|
||||
|
||||
// ES versions
|
||||
case 100:
|
||||
case 300:
|
||||
// versions are complete
|
||||
break;
|
||||
|
||||
// Desktop versions
|
||||
case 110:
|
||||
case 120:
|
||||
case 130:
|
||||
case 140:
|
||||
case 150:
|
||||
// versions are complete
|
||||
break;
|
||||
|
||||
default:
|
||||
infoSink.info << "Warning, version " << version << " is not yet complete; most version-specific features are present, but some are missing.\n";
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -1679,7 +1679,7 @@ type_specifier_nonarray
|
|||
| ISAMPLERCUBEARRAY {
|
||||
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
||||
$$.basicType = EbtSampler;
|
||||
$$.sampler.set(EbtInt, Esd3D, true);
|
||||
$$.sampler.set(EbtInt, EsdCube, true);
|
||||
}
|
||||
| USAMPLER1D {
|
||||
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue