Quellcode durchsuchen

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 vor 4 Jahren
Ursprung
Commit
160ac83203
1 geänderte Dateien mit 6 neuen und 0 gelöschten Zeilen
  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
 #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);
     int tableSize = sizeof(PackUnpackOpParameters) / sizeof(TableParameter);
     TableParameterHandler handler(PackUnpackOpParameters, tableSize);
     TableParameterHandler handler(PackUnpackOpParameters, tableSize);