浏览代码

Fix PackUnpackTest on HW without 16-bit support (#3495)

On devices without native 16-bit support, PackUnpackTest fails to run.  Check and skip the test when unsupported.
Jeff Sooknarine 4 年之前
父节点
当前提交
160ac83203
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      tools/clang/unittests/HLSL/ExecutionTest.cpp

+ 6 - 0
tools/clang/unittests/HLSL/ExecutionTest.cpp

@@ -7934,6 +7934,12 @@ TEST_F(ExecutionTest, PackUnpackTest) {
     }
 #endif
 
+    if (!DoesDeviceSupportNative16bitOps(pDevice)) {
+        WEX::Logging::Log::Comment(L"Device does not support native 16-bit operations.");
+        WEX::Logging::Log::Result(WEX::Logging::TestResults::Skipped);
+        return;
+    }
+
     int tableSize = sizeof(PackUnpackOpParameters) / sizeof(TableParameter);
     TableParameterHandler handler(PackUnpackOpParameters, tableSize);