Преглед на файлове

Skip test if dxil 1.1 is not supported (#340)

David Peixotto преди 8 години
родител
ревизия
629aa34f95
променени са 1 файла, в които са добавени 7 реда и са изтрити 0 реда
  1. 7 0
      tools/clang/unittests/HLSL/DxilModuleTest.cpp

+ 7 - 0
tools/clang/unittests/HLSL/DxilModuleTest.cpp

@@ -69,8 +69,13 @@ public:
     , m_pts(m_msf.get())
   {
     VERIFY_SUCCEEDED(m_dllSupport.Initialize());
+    m_ver.Initialize(m_dllSupport);
     VERIFY_SUCCEEDED(m_dllSupport.CreateInstance(CLSID_DxcCompiler, &pCompiler));
   }
+
+  bool SkipDxil_1_1_Test() {
+    return m_ver.SkipDxil_1_1_Test();
+  }
   
   IDxcOperationResult *Compile(const char *program, LPCWSTR shaderModel = L"ps_6_0") {
     return Compile(program, shaderModel, {}, {});
@@ -141,6 +146,7 @@ private:
   }
 
   dxc::DxcDllSupport &m_dllSupport;
+  VersionSupportInfo m_ver;
   CComPtr<IDxcCompiler> pCompiler;
   CComPtr<IDxcBlobEncoding> pCodeBlob;
   CComPtr<IDxcOperationResult> pCompileResult;
@@ -173,6 +179,7 @@ TEST_F(DxilModuleTest, LoadDxilModule_1_0) {
 
 TEST_F(DxilModuleTest, LoadDxilModule_1_1) {
   Compiler c(m_dllSupport);
+  if (c.SkipDxil_1_1_Test()) return;
   c.Compile(
     "float4 main() : SV_Target {\n"
     "  return 0;\n"