瀏覽代碼

SPV: Standalone; sanity check the client GLSL input semantics option value.

johnkslang 5 年之前
父節點
當前提交
2de6d657dd
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      StandAlone/StandAlone.cpp

+ 4 - 0
StandAlone/StandAlone.cpp

@@ -696,6 +696,8 @@ void ProcessArguments(std::vector<std::unique_ptr<glslang::TWorkItem>>& workItem
                 setOpenGlSpv();
                 setOpenGlSpv();
                 if (argv[0][2] != 0)
                 if (argv[0][2] != 0)
                     ClientInputSemanticsVersion = getAttachedNumber("-G<num> client input semantics");
                     ClientInputSemanticsVersion = getAttachedNumber("-G<num> client input semantics");
+                if (ClientInputSemanticsVersion != 100)
+                    Error("unknown client version for -G, should be 100");
                 break;
                 break;
             case 'H':
             case 'H':
                 Options |= EOptionHumanReadableSpv;
                 Options |= EOptionHumanReadableSpv;
@@ -732,6 +734,8 @@ void ProcessArguments(std::vector<std::unique_ptr<glslang::TWorkItem>>& workItem
                 setVulkanSpv();
                 setVulkanSpv();
                 if (argv[0][2] != 0)
                 if (argv[0][2] != 0)
                     ClientInputSemanticsVersion = getAttachedNumber("-V<num> client input semantics");
                     ClientInputSemanticsVersion = getAttachedNumber("-V<num> client input semantics");
+                if (ClientInputSemanticsVersion != 100)
+                    Error("unknown client version for -V, should be 100");
                 break;
                 break;
             case 'c':
             case 'c':
                 Options |= EOptionDumpConfig;
                 Options |= EOptionDumpConfig;