소스 검색

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);