Skip to content

Commit f88fa6c

Browse files
committed
Mount Vulkan Bin to CE godbolt container in bind:ro mode, make sure it uses proper devel SPIRV disassembly executable
1 parent c5a5383 commit f88fa6c

File tree

1 file changed

+36
-6
lines changed

1 file changed

+36
-6
lines changed

tools/nsc/CMakeLists.txt

Lines changed: 36 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,21 @@ set(NSC_RELEASE_EXECUTABLE "${NBL_DOCKER_CT_NSC_VOLUME_TARGET}/${NBL_RELATIVE_EN
4747
set(NSC_DEBUG_EXECUTABLE "${NBL_DOCKER_CT_NSC_VOLUME_TARGET}/debug/${NBL_RELATIVE_ENTRY}/${EXECUTABLE_NAME}_d")
4848
cmake_path(NATIVE_PATH NSC_RELEASE_EXECUTABLE NORMALIZE NSC_RELEASE_EXECUTABLE)
4949
cmake_path(NATIVE_PATH NSC_DEBUG_EXECUTABLE NORMALIZE NSC_DEBUG_EXECUTABLE)
50-
set(NABLA_SHA "TODO")
50+
51+
# TODO: NABLA_REV_TARGET
5152

5253
string(APPEND CONFIG_CONTENT
5354
[=[
5455
compilers=&dxc
5556
5657
defaultCompiler=nsc_release_upstream
57-
supportsBinary=false
58-
compilerType=hlsl
59-
instructionSet=llvm
58+
supportsBinary=true
59+
supportsBinaryObject=true
60+
compilerType=nsc-spirv
61+
needsMulti=false
62+
supportsLibraryCodeFilter=true
63+
disassemblerPath=@SPIRV_DIS_EXE@
64+
demangler=
6065
6166
group.dxc.compilers=nsc_release_upstream:nsc_debug_upstream
6267
group.dxc.includeFlag=-I
@@ -65,14 +70,35 @@ group.dxc.groupName=NSC compilers
6570
6671
compiler.nsc_release_upstream.exe=@NSC_RELEASE_EXECUTABLE@.exe
6772
compiler.nsc_release_upstream.name=NSC (Release)
68-
compiler.nsc_release_upstream.notification=The NSC (Release) has been compiled from following <a href="https://github.com/Devsh-Graphics-Programming/Nabla/commit/@NABLA_SHA@" target="_blank" rel="noopener noreferrer">commit<sup><small class="fas fa-external-link-alt opens-new-window" title="Opens the commit in a new window"></small></sup></a>.
73+
compiler.nsc_release_upstream.notification=The NSC (Release) has been compiled from following <a href="https://github.com/Devsh-Graphics-Programming/Nabla/commit/@NABLA_REV_TARGET@" target="_blank" rel="noopener noreferrer">commit<sup><small class="fas fa-external-link-alt opens-new-window" title="Opens the commit in a new window"></small></sup></a>.
74+
compiler.nsc_release_upstream.supportsExecute=false
75+
compiler.nsc_release_upstream.options=
76+
compiler.nsc_release_upstream.disassemblerPath=@SPIRV_DIS_EXE@
77+
compiler.nsc_release_upstream.demangler=
6978
7079
compiler.nsc_debug_upstream.exe=@NSC_DEBUG_EXECUTABLE@.exe
7180
compiler.nsc_debug_upstream.name=NSC (Debug)
72-
compiler.nsc_debug_upstream.notification=The NSC (Debug) has been compiled from following <a href="https://github.com/Devsh-Graphics-Programming/Nabla/commit/@NABLA_SHA@" target="_blank" rel="noopener noreferrer">commit<sup><small class="fas fa-external-link-alt opens-new-window" title="Opens the commit in a new window"></small></sup></a>.
81+
compiler.nsc_debug_upstream.notification=The NSC (Debug) has been compiled from following <a href="https://github.com/Devsh-Graphics-Programming/Nabla/commit/@NABLA_REV_TARGET@" target="_blank" rel="noopener noreferrer">commit<sup><small class="fas fa-external-link-alt opens-new-window" title="Opens the commit in a new window"></small></sup></a>.
82+
compiler.nsc_debug_upstream.supportsExecute=false
83+
compiler.nsc_debug_upstream.options=
84+
compiler.nsc_debug_upstream.disassemblerPath=@SPIRV_DIS_EXE@
85+
compiler.nsc_debug_upstream.demangler=
7386
]=]
7487
)
7588

89+
find_program(SPIRV_DIS_EXE
90+
NAMES spirv-dis
91+
HINTS "$ENV{VULKAN_SDK_INSTALL_DIRECTORY}/Bin"
92+
HINTS "$ENV{VK_SDK_PATH}/Bin"
93+
HINTS "$ENV{VULKAN_SDK}/Bin"
94+
REQUIRED
95+
)
96+
97+
cmake_path(GET SPIRV_DIS_EXE PARENT_PATH VULKAN_SDK_BIN_DIRECTORY)
98+
cmake_path(GET SPIRV_DIS_EXE FILENAME SPIRV_DIS_EXE)
99+
set(SPIRV_DIS_EXE "C:\\vulkan\\bin\\${SPIRV_DIS_EXE}")
100+
cmake_path(NATIVE_PATH SPIRV_DIS_EXE NORMALIZE SPIRV_DIS_EXE)
101+
76102
string(CONFIGURE "${CONFIG_CONTENT}" CONFIG_CONTENT @ONLY)
77103
file(WRITE "${NBL_DOCKER_NSC_COMPILER_CONFIG_OUTPUT}" "${CONFIG_CONTENT}")
78104

@@ -104,6 +130,10 @@ services:
104130
source: @MSVC_REDIST_DIR@
105131
target: C:\redist
106132
read_only: true
133+
- type: bind
134+
source: @VULKAN_SDK_BIN_DIRECTORY@
135+
target: C:\vulkan\bin
136+
read_only: true
107137
108138
networks:
109139
docker_default:

0 commit comments

Comments
 (0)