@@ -781,6 +781,10 @@ class ExecutionTest {
781781 void RunResourceTest(ID3D12Device *pDevice, const char *pShader,
782782 const wchar_t *sm, bool isDynamic);
783783
784+ void runCoopVecMulTest();
785+ void runCoopVecOuterProductTest();
786+
787+ #if HAVE_COOPVEC_API
784788 struct CoopVecMulSubtestConfig {
785789 int InputPerThread;
786790 int OutputPerThread;
@@ -790,7 +794,6 @@ class ExecutionTest {
790794 bool Bias;
791795 };
792796
793- void runCoopVecMulTest();
794797 void
795798 runCoopVecMulTestConfig(ID3D12Device *D3DDevice,
796799 D3D12_COOPERATIVE_VECTOR_PROPERTIES_MUL &MulProps);
@@ -805,14 +808,14 @@ class ExecutionTest {
805808 D3D12_LINEAR_ALGEBRA_MATRIX_LAYOUT MatrixLayout;
806809 };
807810
808- void runCoopVecOuterProductTest();
809811 void runCoopVecOuterProductTestConfig(
810812 ID3D12Device *D3DDevice,
811813 D3D12_COOPERATIVE_VECTOR_PROPERTIES_ACCUMULATE &AccumulateProps);
812814 void runCoopVecOuterProductSubtest(
813815 ID3D12Device *D3DDevice,
814816 D3D12_COOPERATIVE_VECTOR_PROPERTIES_ACCUMULATE &AccumulateProps,
815817 CoopVecOuterProductSubtestConfig &Config);
818+ #endif // HAVE_COOPVEC_API
816819
817820 template <class T1, class T2>
818821 void WaveIntrinsicsActivePrefixTest(TableParameter *pParameterList,
@@ -1771,13 +1774,18 @@ class ExecutionTest {
17711774 }
17721775
17731776 bool DoesDeviceSupportCooperativeVector(ID3D12Device *Device) {
1777+ #if HAVE_COOPVEC_API
17741778 D3D12_FEATURE_DATA_D3D12_OPTIONS_EXPERIMENTAL O;
17751779 if (FAILED(Device->CheckFeatureSupport(
17761780 (D3D12_FEATURE)D3D12_FEATURE_D3D12_OPTIONS_EXPERIMENTAL, &O,
17771781 sizeof(O))))
17781782 return false;
17791783 return O.CooperativeVectorTier !=
17801784 D3D12_COOPERATIVE_VECTOR_TIER_NOT_SUPPORTED;
1785+ #else
1786+ UNREFERENCED_PARAMETER(Device);
1787+ return false;
1788+ #endif
17811789 }
17821790
17831791 bool IsFallbackPathEnabled() {
@@ -11994,6 +12002,12 @@ VERIFY_SUCCEEDED(DoArraysMatch<T>(OutputVector, ExpectedVector,
1199412002//
1199512003// The current implementation will always write the final output data as float.
1199612004void ExecutionTest::runCoopVecMulTest() {
12005+ #if !HAVE_COOPVEC_API
12006+ WEX::Logging::Log::Comment(
12007+ "Cooperative vector API not supported in build configuration. Skipping.");
12008+ WEX::Logging::Log::Result(WEX::Logging::TestResults::Skipped);
12009+ return;
12010+ #else
1199712011 // Create device and verify coopvec support
1199812012 CComPtr<ID3D12Device> D3DDevice;
1199912013 if (!CreateDevice(&D3DDevice, D3D_SHADER_MODEL_6_9)) {
@@ -12104,8 +12118,10 @@ void ExecutionTest::runCoopVecMulTest() {
1210412118 // Run the test
1210512119 runCoopVecMulTestConfig(D3DDevice, MulAddConfig);
1210612120 }
12121+ #endif // HAVE_COOPVEC_API
1210712122}
1210812123
12124+ #if HAVE_COOPVEC_API
1210912125void ExecutionTest::runCoopVecMulTestConfig(
1211012126 ID3D12Device *D3DDevice,
1211112127 D3D12_COOPERATIVE_VECTOR_PROPERTIES_MUL &MulProps) {
@@ -12730,6 +12746,7 @@ void main(uint threadIdx : SV_GroupThreadID)
1273012746 VERIFY_IS_TRUE(Equal);
1273112747 }
1273212748}
12749+ #endif // HAVE_COOPVEC_API
1273312750
1273412751TEST_F(ExecutionTest, CoopVec_Mul) {
1273512752 WEX::TestExecution::SetVerifyOutput verifySettings(
@@ -12738,6 +12755,12 @@ TEST_F(ExecutionTest, CoopVec_Mul) {
1273812755}
1273912756
1274012757void ExecutionTest::runCoopVecOuterProductTest() {
12758+ #if !HAVE_COOPVEC_API
12759+ WEX::Logging::Log::Comment(
12760+ "Cooperative vector API not supported in build configuration. Skipping.");
12761+ WEX::Logging::Log::Result(WEX::Logging::TestResults::Skipped);
12762+ return;
12763+ #else
1274112764 // Create device and verify coopvec support
1274212765 CComPtr<ID3D12Device> D3DDevice;
1274312766 if (!CreateDevice(&D3DDevice, D3D_SHADER_MODEL_6_9)) {
@@ -12771,8 +12794,10 @@ void ExecutionTest::runCoopVecOuterProductTest() {
1277112794 // Run the test
1277212795 runCoopVecOuterProductTestConfig(D3DDevice, AccumulateConfig);
1277312796 }
12797+ #endif // HAVE_COOPVEC_API
1277412798}
1277512799
12800+ #if HAVE_COOPVEC_API
1277612801void ExecutionTest::runCoopVecOuterProductTestConfig(
1277712802 ID3D12Device *D3DDevice,
1277812803 D3D12_COOPERATIVE_VECTOR_PROPERTIES_ACCUMULATE &AccumulateProps) {
@@ -13314,6 +13339,7 @@ void main(uint threadIdx : SV_GroupThreadID)
1331413339 VERIFY_IS_TRUE(Equal);
1331513340 }
1331613341}
13342+ #endif // HAVE_COOPVEC_API
1331713343
1331813344TEST_F(ExecutionTest, CoopVec_OuterProduct) {
1331913345 WEX::TestExecution::SetVerifyOutput verifySettings(
0 commit comments