Fix an issue of interpolateAtVertexAMD().
authorRex Xu <rex.xu@amd.com>
Wed, 14 Feb 2018 03:42:34 +0000 (11:42 +0800)
committerRex Xu <rex.xu@amd.com>
Wed, 14 Feb 2018 03:42:34 +0000 (11:42 +0800)
An error message should be reported if the interpolant is not an input.

glslang/MachineIndependent/ParseHelper.cpp

index 69f4799..8016e2e 100644 (file)
@@ -1585,6 +1585,9 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan
     case EOpInterpolateAtCentroid:
     case EOpInterpolateAtSample:
     case EOpInterpolateAtOffset:
+#ifdef AMD_EXTENSIONS
+    case EOpInterpolateAtVertex:
+#endif
         // Make sure the first argument is an interpolant, or an array element of an interpolant
         if (arg0->getType().getQualifier().storage != EvqVaryingIn) {
             // It might still be an array element.