The DLSS build failed on Windows at dlss_wgpu's bindgen step: libclang.dll
is neither in the DLSS SDK nor in the Vulkan headers. It is now part of the
same zero-manual toolchain.
Detection first, download last: an explicit LIBCLANG_PATH (directory with
libclang.dll or clang.dll) wins and disables auto-install; otherwise PATH,
Program Files\LLVM\bin (both Program Files roots) and LLVM shipped with
Visual Studio (vswhere -find VC\Tools\Llvm\x64\bin\libclang.dll) are
checked, then the cache.
When nothing is found, the NuGet package libclang.runtime.win-x64 is
downloaded (~34 MB, version from the flat-container index with pinned
23.1.5 fallback) and only runtimes/win-x64/native/libclang.dll (~89 MB) is
extracted to .horizon-cache/libclang/<version>/ behind the existing
staging + airdef-install.json marker pattern. The resolved directory is
passed to cargo as LIBCLANG_PATH.
libclang is resolved only when the DLSS SDK and Vulkan headers are already
available, so a missing SDK never triggers a useless download. Any
detection/download/extract failure warns and degrades to mods/TAAU, and
non-Windows/non-RTX still returns before any network access.
Tests cover PATH/Program Files/vswhere detection, explicit precedence,
numeric NuGet version choice and fallback, selective extraction and marker,
cache hit, damaged cache reinstall, package without the DLL, plan env
wiring and failure to mods-only.
Co-Authored-By: Kimi Code <noreply@moonshot.ai>
A valid DLSS_SDK must not block the Vulkan header auto-download, and vice
versa; assert that only the missing component is fetched.
Co-Authored-By: Kimi Code <noreply@moonshot.ai>
Scanning .horizon-cache/dlss-sdk is best-effort: a permissions error or a
missing directory now means "nothing cached" and the normal install path
runs, instead of an exception escaping before the mods fallback.
Co-Authored-By: Kimi Code <noreply@moonshot.ai>
`airdef.py game` no longer needs manual SDK setup. On Windows with an RTX
adapter, when neither DLSS_SDK nor VULKAN_SDK is set, it downloads only the
files dlss_wgpu reads:
- NVIDIA/DLSS at the newest stable v310.9.x tag (GitHub API; pinned v310.9.1
when the API fails): include/*.h, both x64 static libs and the runtime
rel/nvngx_dlss.dll (~67 MB once), laid out under
.horizon-cache/dlss-sdk/<tag>/ exactly as valid_dlss_sdk expects.
- KhronosGroup/Vulkan-Headers include/ under
.horizon-cache/vulkan-headers/<tag>/Include/, since build.rs uses headers
only and links no Vulkan library.
The resolved roots are passed to cargo as DLSS_SDK/VULKAN_SDK, and after a
successful dlss build the fresh nvngx_dlss.dll is copied beside the built
horizon-client.exe. Explicit DLSS_SDK/VULKAN_SDK (and the sdk argument)
keep priority and disable auto-download for that component. Any network or
layout failure warns and falls back to --features mods/native TAAU instead
of failing the build; non-Windows and non-RTX take the old mods path with
no network access.
valid_dlss_sdk now looks for the real nvsdk_ngx*.h names instead of the
nonexistent nvngx*.h glob, so a genuine SDK (and the downloaded cache) is
recognised at all.
Tests cover tag selection and fallback, selective layout + marker cache
hit, damaged/partial caches, streamed download and truncation, Vulkan
Include layout, plan env wiring, explicit-env precedence, failure to mods,
and DLL placement beside the client.
Co-Authored-By: Kimi Code <noreply@moonshot.ai>
tools/airdef.py game always built with --features mods, so an RTX user had
to run the manual cargo line from docs/DLSS-TESTING.md. The feature string
now comes from dlss_build_features(): dlss is added only when the OS is
Windows, a Win32_VideoController name has both NVIDIA and RTX, the DLSS SDK
has include/nvngx*.h and lib/Windows_x86_64/x64 (DLSS_SDK, a repo DLSS/ dir
or %ProgramFiles%\NVIDIA\DLSS), and VULKAN_SDK has Include/vulkan/vulkan.h
(dlss_wgpu's build script needs both SDKs). Otherwise the build stays
mods-only; on Windows + RTX without the SDK it prints how to get v310.9.1
instead of failing. GPU/SDK probe errors mean "no DLSS" and never abort the
build; the HORIZON_DLSS runtime switch is untouched.
Tests: tools/test_airdef_build.py covers non-Windows, no RTX, missing DLSS
SDK, missing Vulkan SDK, the full toolchain, a failed GPU probe, the SDK
layout check and the feature string reaching cargo. python3 tools/airdef.py
game still builds mods-only on macOS (fresh target dir: 3m11s, exit 0).
Co-Authored-By: Kimi Code <noreply@moonshot.ai>
Reproduce stale upstream configuration with real local Git repositories, including the already-matching pin fast path.
Co-authored-by: Codex <codex@openai.com>