Skip to content

Commit be3992b

Browse files
Fix build without coopvec support
1 parent 906b8b7 commit be3992b

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

tools/clang/unittests/HLSLExec/CoopVec.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#pragma once
22

3+
#if HAVE_COOPVEC_API
4+
35
#include <DirectXMath.h>
46
#include <DirectXPackedVector.h>
57
#include <vector>
@@ -353,4 +355,6 @@ GetMatrixSrcDataType(D3D12_LINEAR_ALGEBRA_DATATYPE MatrixInterpretation) {
353355
return D3D12_LINEAR_ALGEBRA_DATATYPE_FLOAT32;
354356
}
355357
}
356-
}; // namespace CoopVecHelpers
358+
}; // namespace CoopVecHelpers
359+
360+
#endif // HAVE_COOPVEC_API

tools/clang/unittests/HLSLExec/ExecutionTest.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@
6464
#include <libloaderapi.h>
6565
#include <DirectXPackedVector.h>
6666
#include "LongVectors.h"
67-
#include "CoopVec.h"
6867
#include "CoopVecAPI.h"
68+
#include "CoopVec.h"
6969
// clang-format on
7070

7171
#pragma comment(lib, "d3dcompiler.lib")
@@ -1904,10 +1904,12 @@ class ExecutionTest {
19041904
std::vector<UUID> Features;
19051905

19061906
Features.push_back(D3D12ExperimentalShaderModels);
1907+
1908+
#if HAVE_COOPVEC_API
19071909
if (GetTestParamBool(L"CooperativeVectorExperimental")) {
19081910
Features.push_back(D3D12CooperativeVectorExperiment);
19091911
}
1910-
1912+
#endif
19111913
return pD3D12EnableExperimentalFeatures((UINT)Features.size(),
19121914
Features.data(), nullptr, nullptr);
19131915
}

0 commit comments

Comments
 (0)