Add-support-for-SPV_NV_mesh_shader
diff --git a/StandAlone/ResourceLimits.cpp b/StandAlone/ResourceLimits.cpp
index e22ec80..0765ed1 100644
--- a/StandAlone/ResourceLimits.cpp
+++ b/StandAlone/ResourceLimits.cpp
@@ -125,6 +125,18 @@
     /* .MaxCullDistances = */ 8,
     /* .MaxCombinedClipAndCullDistances = */ 8,
     /* .MaxSamples = */ 4,
+#ifdef NV_EXTENSIONS
+    /* .maxMeshOutputVerticesNV = */ 256,
+    /* .maxMeshOutputPrimitivesNV = */ 512,
+    /* .maxMeshWorkGroupSizeX_NV = */ 32,
+    /* .maxMeshWorkGroupSizeY_NV = */ 1,
+    /* .maxMeshWorkGroupSizeZ_NV = */ 1,
+    /* .maxTaskWorkGroupSizeX_NV = */ 32,
+    /* .maxTaskWorkGroupSizeY_NV = */ 1,
+    /* .maxTaskWorkGroupSizeZ_NV = */ 1,
+    /* .maxMeshViewCountNV = */ 4,
+#endif
+
     /* .limits = */ {
         /* .nonInductiveForLoops = */ 1,
         /* .whileLoops = */ 1,
@@ -224,7 +236,17 @@
             << "MaxCullDistances "                          << DefaultTBuiltInResource.maxCullDistances << "\n"
             << "MaxCombinedClipAndCullDistances "           << DefaultTBuiltInResource.maxCombinedClipAndCullDistances << "\n"
             << "MaxSamples "                                << DefaultTBuiltInResource.maxSamples << "\n"
-
+#ifdef NV_EXTENSIONS
+            << "MaxMeshOutputVerticesNV "                   << DefaultTBuiltInResource.maxMeshOutputVerticesNV << "\n"
+            << "MaxMeshOutputPrimitivesNV "                 << DefaultTBuiltInResource.maxMeshOutputPrimitivesNV << "\n"
+            << "MaxMeshWorkGroupSizeX_NV "                  << DefaultTBuiltInResource.maxMeshWorkGroupSizeX_NV << "\n"
+            << "MaxMeshWorkGroupSizeY_NV "                  << DefaultTBuiltInResource.maxMeshWorkGroupSizeY_NV << "\n"
+            << "MaxMeshWorkGroupSizeZ_NV "                  << DefaultTBuiltInResource.maxMeshWorkGroupSizeZ_NV << "\n"
+            << "MaxTaskWorkGroupSizeX_NV "                  << DefaultTBuiltInResource.maxTaskWorkGroupSizeX_NV << "\n"
+            << "MaxTaskWorkGroupSizeY_NV "                  << DefaultTBuiltInResource.maxTaskWorkGroupSizeY_NV << "\n"
+            << "MaxTaskWorkGroupSizeZ_NV "                  << DefaultTBuiltInResource.maxTaskWorkGroupSizeZ_NV << "\n"
+            << "MaxMeshViewCountNV "                        << DefaultTBuiltInResource.maxMeshViewCountNV << "\n"
+#endif
             << "nonInductiveForLoops "                      << DefaultTBuiltInResource.limits.nonInductiveForLoops << "\n"
             << "whileLoops "                                << DefaultTBuiltInResource.limits.whileLoops << "\n"
             << "doWhileLoops "                              << DefaultTBuiltInResource.limits.doWhileLoops << "\n"
@@ -431,6 +453,26 @@
             resources->maxCombinedClipAndCullDistances = value;
         else if (tokenStr == "MaxSamples")
             resources->maxSamples = value;
+#ifdef NV_EXTENSIONS
+        else if (tokenStr == "MaxMeshOutputVerticesNV")
+            resources->maxMeshOutputVerticesNV = value;
+        else if (tokenStr == "MaxMeshOutputPrimitivesNV")
+            resources->maxMeshOutputPrimitivesNV = value;
+        else if (tokenStr == "MaxMeshWorkGroupSizeX_NV")
+            resources->maxMeshWorkGroupSizeX_NV = value;
+        else if (tokenStr == "MaxMeshWorkGroupSizeY_NV")
+            resources->maxMeshWorkGroupSizeY_NV = value;
+        else if (tokenStr == "MaxMeshWorkGroupSizeZ_NV")
+            resources->maxMeshWorkGroupSizeZ_NV = value;
+        else if (tokenStr == "MaxTaskWorkGroupSizeX_NV")
+            resources->maxTaskWorkGroupSizeX_NV = value;
+        else if (tokenStr == "MaxTaskWorkGroupSizeY_NV")
+            resources->maxTaskWorkGroupSizeY_NV = value;
+        else if (tokenStr == "MaxTaskWorkGroupSizeZ_NV")
+            resources->maxTaskWorkGroupSizeZ_NV = value;
+        else if (tokenStr == "MaxMeshViewCountNV")
+            resources->maxMeshViewCountNV = value;
+#endif
         else if (tokenStr == "nonInductiveForLoops")
             resources->limits.nonInductiveForLoops = (value != 0);
         else if (tokenStr == "whileLoops")
diff --git a/StandAlone/StandAlone.cpp b/StandAlone/StandAlone.cpp
index 38ba597..fc0a4b5 100644
--- a/StandAlone/StandAlone.cpp
+++ b/StandAlone/StandAlone.cpp
@@ -244,6 +244,10 @@
         case EShLangGeometry:        name = "geom.spv";    break;
         case EShLangFragment:        name = "frag.spv";    break;
         case EShLangCompute:         name = "comp.spv";    break;
+#ifdef NV_EXTENSIONS
+        case EShLangMeshNV:          name = "mesh.spv";    break;
+        case EShLangTaskNV:          name = "task.spv";    break;
+#endif
         default:                     name = "unknown";     break;
         }
     } else
@@ -1250,6 +1254,12 @@
         return EShLangFragment;
     else if (stageName == "comp")
         return EShLangCompute;
+#ifdef NV_EXTENSIONS
+    else if (stageName == "mesh")
+        return EShLangMeshNV;
+    else if (stageName == "task")
+        return EShLangTaskNV;
+#endif
 
     usage();
     return EShLangVertex;
@@ -1319,6 +1329,10 @@
            "    .geom   for a geometry shader\n"
            "    .frag   for a fragment shader\n"
            "    .comp   for a compute shader\n"
+#ifdef NV_EXTENSIONS
+           "    .mesh   for a mesh shader\n"
+           "    .task   for a task shader\n"
+#endif
            "    .glsl   for .vert.glsl, .tesc.glsl, ..., .comp.glsl compound suffixes\n"
            "    .hlsl   for .vert.hlsl, .tesc.hlsl, ..., .comp.hlsl compound suffixes\n"
            "\n"