File tree Expand file tree Collapse file tree 6 files changed +12
-13
lines changed Expand file tree Collapse file tree 6 files changed +12
-13
lines changed Original file line number Diff line number Diff line change @@ -117,14 +117,14 @@ jobs:
117
117
cd DXC
118
118
mkdir build
119
119
cd build
120
- cmake -G Ninja -DCMAKE_POLICY_DEFAULT_CMP0141=NEW - DCMAKE_BUILD_TYPE=${{ inputs.BuildType }} -C ${{ github.workspace }}/DXC/cmake/caches/PredefinedParams.cmake -C ${{ github.workspace }}/HLSLTest/cmake/caches/sccache.cmake -DHLSL_DISABLE_SOURCE_GENERATION=On ${{ github.workspace }}/DXC/
120
+ cmake -G Ninja -DCMAKE_BUILD_TYPE=${{ inputs.BuildType }} -C ${{ github.workspace }}/DXC/cmake/caches/PredefinedParams.cmake -C ${{ github.workspace }}/HLSLTest/cmake/caches/sccache.cmake -DHLSL_DISABLE_SOURCE_GENERATION=On ${{ github.workspace }}/DXC/
121
121
ninja
122
122
- name : Build LLVM
123
123
run : |
124
124
cd llvm-project
125
125
mkdir build
126
126
cd build
127
- cmake -G Ninja -DCMAKE_BUILD_TYPE=${{ inputs.BuildType }} -C ${{ github.workspace }}/llvm-project/clang/cmake/caches/HLSL.cmake -C ${{ github.workspace }}/HLSLTest/cmake/caches/sccache.cmake -DDXC_BUILD_DIR =${{ github.workspace }}/DXC/build/bin -DLLVM_EXTERNAL_HLSLTEST_SOURCE_DIR=${{ github.workspace }}/HLSLTest -DLLVM_EXTERNAL_PROJECTS="HLSLTest" -DLLVM_LIT_ARGS="--xunit-xml-output=testresults.xunit.xml -v" -DHLSLTEST_TEST_CLANG=${{ inputs.Test-Clang }} ${{ github.workspace }}/llvm-project/llvm/
127
+ cmake -G Ninja -DCMAKE_BUILD_TYPE=${{ inputs.BuildType }} -C ${{ github.workspace }}/llvm-project/clang/cmake/caches/HLSL.cmake -C ${{ github.workspace }}/HLSLTest/cmake/caches/sccache.cmake -DDXC_DIR =${{ github.workspace }}/DXC/build/bin -DLLVM_EXTERNAL_HLSLTEST_SOURCE_DIR=${{ github.workspace }}/HLSLTest -DLLVM_EXTERNAL_PROJECTS="HLSLTest" -DLLVM_LIT_ARGS="--xunit-xml-output=testresults.xunit.xml -v" -DHLSLTEST_TEST_CLANG=${{ inputs.Test-Clang }} ${{ github.workspace }}/llvm-project/llvm/
128
128
ninja hlsl-test-depends
129
129
- name : Run HLSL Tests
130
130
run : |
Original file line number Diff line number Diff line change @@ -12,11 +12,10 @@ set(HLSLTEST_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/include)
12
12
set (HLSLTEST_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR} )
13
13
set (HLSLTEST_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} )
14
14
15
- set (DXC_BUILD_DIR "" CACHE STRING "Path to a DXC build directory" )
16
- find_program (DXC_EXECUTABLE dxc HINTS ${DXC_BUILD_DIR } )
17
- find_program (DXV_EXECUTABLE dxv HINTS ${DXC_BUILD_DIR } )
15
+ set (DXC_DIR "" CACHE STRING "Path to a DXC build or install binary directory" )
16
+ find_program (DXC_EXECUTABLE dxc HINTS ${DXC_DIR } )
17
+ find_program (DXV_EXECUTABLE dxv HINTS ${DXC_DIR } )
18
18
19
- set (HLSLTEST_COMPILER ${DXC_EXECUTABLE} CACHE STRING "Compiler to use for testing (uses dxc from PATH if unset)" )
20
19
if ("clang" IN_LIST LLVM_ENABLE_PROJECTS )
21
20
set (default_HLSLTEST_TEST_CLANG On )
22
21
else ()
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ If you do not have a build of dxc on your path you'll need to specify the shader
31
31
compiler to use by passing:
32
32
33
33
``` shell
34
- -DHLSLTEST_COMPILER =< path to compiler >
34
+ -DDXC_DIR =< path to folder containing dxc & dxv >
35
35
```
36
36
37
37
# YAML Pipeline Format
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ function(try_compile_hlsl output)
20
20
set (TRY_COMPILE_FLAGS "${ARG_FLAGS} " )
21
21
string (REPLACE ";" " " extra_flags "${TRY_COMPILE_FLAGS} " )
22
22
23
- set (test_compile_command ${HLSLTEST_COMPILER } ${extra_flags} ${SIMPLE_HLSL} )
23
+ set (test_compile_command ${DXC_EXECUTABLE } ${extra_flags} ${SIMPLE_HLSL} )
24
24
string (REPLACE "\" " "" test_compile_command "${test_compile_command} " )
25
25
string (REPLACE " " ";" test_compile_command "${test_compile_command} " )
26
26
Original file line number Diff line number Diff line change 48
48
tools .append (ToolSubst ("%gpu-exec" , FindTool ("gpu-exec" )))
49
49
50
50
if config .hlsltest_test_clang :
51
- if os .path .exists (config .hlsltest_dxv ):
52
- tools .append (ToolSubst ("dxc" , FindTool ("clang-dxc" ), extra_args = ["--dxv-path=%s" % config .hlsltest_dxv ]))
51
+ if os .path .exists (config .hlsltest_dxc_dir ):
52
+ tools .append (ToolSubst ("dxc" , FindTool ("clang-dxc" ), extra_args = ["--dxv-path=%s" % config .hlsltest_dxc_dir ]))
53
53
else :
54
54
tools .append (ToolSubst ("dxc" , FindTool ("clang-dxc" )))
55
55
config .available_features .add ("Clang" )
56
56
else :
57
- tools .append (ToolSubst ("dxc" , config .hlsltest_compiler ))
57
+ tools .append (ToolSubst ("dxc" , config .hlsltest_dxc ))
58
58
59
59
llvm_config .add_tool_substitutions (tools , config .llvm_tools_dir )
60
60
Original file line number Diff line number Diff line change @@ -5,11 +5,11 @@ import sys
5
5
config.hlsltest_obj_root = path(r"@HLSLTEST_BINARY_DIR@")
6
6
config.hlsltest_src_root = path(r"@HLSLTEST_SOURCE_DIR@")
7
7
config.llvm_tools_dir = lit_config.substitute(path(r"@LLVM_TOOLS_DIR@"))
8
- config.hlsltest_compiler = path(r"@HLSLTEST_COMPILER @")
8
+ config.hlsltest_dxc = path(r"@DXC_EXECUTABLE @")
9
9
config.hlsltest_supports_spirv = @SUPPORTS_SPIRV@
10
10
config.hlsltest_test_clang = @FORCE_CLANG@
11
11
config.hlsltest_test_warp = @FORCE_WARP@
12
- config.hlsltest_dxv = "@DXV_EXECUTABLE @"
12
+ config.hlsltest_dxc_dir = r"@DXC_DIR @"
13
13
14
14
config.hlsltest_suite = "@suite@"
15
15
config.hlsltest_enable_d3d12 = @TEST_d3d12@
You can’t perform that action at this time.
0 commit comments