Skip to content

Commit f94396d

Browse files
authored
Long Vector Execution tests preliminary work to merge a minor refactor. (microsoft#7532)
This resolves issue microsoft#7531. This is a preliminary step to merging in some of the Long Vector Execution tests currently sitting in the staging-sm6.9 branch. There are no functional changes here, but given that this is a refactor I do not want to add the [NFC] tag to the PR title. - Moves functions used by existing exec tests and incoming long vector tests to a common HlslExecTestUtils.h. - Updates naming to adhere to LLVM coding standards for newly created files (even though the functions aren't new) - Move a few other shared functions to files that make more sense than ExecutionTest.cpp. - TableParameterHandler class moved to its own header/cpp files. No naming updates as nothing else was touched. Can update in a subsequent PR if it is preferred. - Add the LLVM coding guidelines preferred include guard to HlslTestUtils.h to mitigate redefinition issues exposed by this refactor. - Updated the D3D shader model 'redefines' in ExecutionTest.cpp as they were also factored out into a common header. constexpr required because they are enum values. - BigObj added to the cmake file as I was hitting issues locally for this.
1 parent 57177f7 commit f94396d

8 files changed

Lines changed: 1458 additions & 1144 deletions

File tree

include/dxc/Test/HlslTestUtils.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
///////////////////////////////////////////////////////////////////////////////
1111

1212
// *** THIS FILE CANNOT TAKE ANY LLVM DEPENDENCIES *** //
13+
#ifndef HLSLTESTUTILS_H
14+
#define HLSLTESTUTILS_H
1315

1416
#include <algorithm>
1517
#include <atomic>
@@ -735,3 +737,5 @@ inline UINT GetByteSizeForFormat(DXGI_FORMAT value) {
735737
}
736738
}
737739
#endif
740+
741+
#endif // HLSLTESTUTILS_H

tools/clang/unittests/HLSLExec/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,12 @@
33
find_package(TAEF REQUIRED)
44
find_package(D3D12 REQUIRED) # Used for ExecutionTest.cpp.
55

6+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj")
7+
68
add_clang_library(ExecHLSLTests SHARED
79
ExecutionTest.cpp
810
ShaderOpTest.cpp
11+
TableParameterHandler.cpp
912
ExecHLSLTests.rc
1013
)
1114

0 commit comments

Comments
 (0)