Skip to content

Pick native DXC and Slang binaries on Arm64 Windows hosts - #26

Merged
dzhdanNV merged 1 commit into
NVIDIA-RTX:mainfrom
calhsu-nvidia:calhsu/arm64-host-compilers
Sep 29, 2026
Merged

dzhdanNV merged 1 commit into
NVIDIA-RTX:mainfrom
calhsu-nvidia:calhsu/arm64-host-compilers

Conversation

@calhsu-nvidia

Copy link
Copy Markdown
Contributor

The DXC/FXC/Slang arch check matched "arm64" case-sensitively against
CMAKE_SYSTEM_PROCESSOR, which Windows CMake reports as ARM64, so Arm64 Windows
hosts always downloaded and ran the x64 compilers under emulation.

The compilers run on the build host, so this tests CMAKE_HOST_SYSTEM_PROCESSOR
case-insensitively instead. Shader output is unchanged; only the compiler binary
that runs is different.

Measured on an Arm64 Windows host, CMake 4.4.3:

cmake.exe reports Before After
Arm64 build ARM64 x64 DXC (emulated) arm64 DXC
x64 build (emulated) AMD64 x64 DXC x64 DXC

CMake reports the architecture of cmake.exe itself, so the fix takes effect with a
native Arm64 CMake.

Compiling a 2,100-line DXR library shader (-T lib_6_6 -O3) with DXC v1.9.2602:
native arm64 dxc.exe 550 ms vs x64 under emulation 1081 ms (median of 5), about
2x faster, with byte-identical DXIL output.

x64 hosts are unaffected, including x64-hosted -A ARM64 Visual Studio cross builds,
which still select bin/x64/dxc.exe.

The arch check matched "arm64" case-sensitively against
CMAKE_SYSTEM_PROCESSOR, which CMake reports as "ARM64" on Windows, so
Arm64 hosts always got the x64 compilers and ran them under emulation.
The compilers run on the build host, so test CMAKE_HOST_SYSTEM_PROCESSOR
case-insensitively instead.

Native DXC compiles ~2x faster (550 vs 1081 ms on a DXR library shader)
with identical output. An x64 cmake.exe reports AMD64 under emulation,
so it still selects the x64 tools.
@dzhdanNV
dzhdanNV merged commit 09cbea7 into NVIDIA-RTX:main Sep 29, 2026
2 of 3 checks passed
@dzhdanNV

Copy link
Copy Markdown
Collaborator

Merged! Thanks!

@github-actions github-actions Bot locked and limited conversation to collaborators Sep 29, 2026
@calhsu-nvidia
calhsu-nvidia deleted the calhsu/arm64-host-compilers branch September 29, 2026 10:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants