Commit 45d4a94c by John Kessenich

Merge remote-tracking branch 'GitHub/master'

parents 7160e172 caa54449
...@@ -515,6 +515,12 @@ public: ...@@ -515,6 +515,12 @@ public:
return flat || smooth || nopersp; return flat || smooth || nopersp;
#endif #endif
} }
#ifdef AMD_EXTENSIONS
bool isExplicitInterpolation() const
{
return explicitInterp;
}
#endif
bool isAuxiliary() const bool isAuxiliary() const
{ {
return centroid || patch || sample; return centroid || patch || sample;
......
...@@ -1609,6 +1609,23 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan ...@@ -1609,6 +1609,23 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan
if (base == nullptr || base->getType().getQualifier().storage != EvqVaryingIn) if (base == nullptr || base->getType().getQualifier().storage != EvqVaryingIn)
error(loc, "first argument must be an interpolant, or interpolant-array element", fnCandidate.getName().c_str(), ""); error(loc, "first argument must be an interpolant, or interpolant-array element", fnCandidate.getName().c_str(), "");
} }
#ifdef AMD_EXTENSIONS
if (callNode.getOp() == EOpInterpolateAtVertex) {
if (!arg0->getType().getQualifier().isExplicitInterpolation())
error(loc, "argument must be qualified as __explicitInterpAMD in", "interpolant", "");
else {
if (! (*argp)[1]->getAsConstantUnion())
error(loc, "argument must be compile-time constant", "vertex index", "");
else {
unsigned vertexIdx = (*argp)[1]->getAsConstantUnion()->getConstArray()[0].getUConst();
if (vertexIdx > 2)
error(loc, "must be in the range [0, 2]", "vertex index", "");
}
}
}
#endif
break; break;
case EOpEmitStreamVertex: case EOpEmitStreamVertex:
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
"site" : "github", "site" : "github",
"subrepo" : "KhronosGroup/SPIRV-Tools", "subrepo" : "KhronosGroup/SPIRV-Tools",
"subdir" : "External/spirv-tools", "subdir" : "External/spirv-tools",
"commit" : "4e4a254bc85ea41af93a048f1713ef27e04c01ab" "commit" : "46a9ec9d2312bc8f2a87810614d06c721ea3121c"
}, },
{ {
"name" : "spirv-tools/external/spirv-headers", "name" : "spirv-tools/external/spirv-headers",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment