OverviewFilesCommitsIssuesDocsReleasesPeers

nvidia-rtx-godot commits / bf137b6

Error instead of prompting to install the DLSS SDK
Per review feedback, match Godot's convention: SCons does not download dependencies automatically or use interactive prompts. When use_ngx_dlss is enabled but the SDK is missing, print an error directing the user to run misc/scripts/install_dlss_linux.py (or build with use_ngx_dlss=no) and abort, rather than offering to fetch it. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
bf137b67bf1433ef01711b3b3ee5bcc85b3be777
by plankatron <fleeky@gmail.com> · 2026-06-17T22:15:46.000Z

Changed files (1) +10 -21

SConstruct +10 -21
……@@ -641,28 +641,17 @@ if env["use_ngx_dlss"]:
641641 # The static link library doubles as a sentinel that the SDK has been installed.
642642 ngx_static_lib = "thirdparty/ngx/lib/linux_x86_64/libnvsdk_ngx.a"
643643 if not os.path.isfile(ngx_static_lib):
644 print_warning("NVIDIA DLSS SDK not found (thirdparty/ngx is fetched on demand, not vendored).")
645 if sys.stdin.isatty() and input(
646 "Download the NVIDIA DLSS SDK now with misc/scripts/install_dlss_linux.py? [y/N] "
647 ).strip().lower() in ("y", "yes"):
648 import subprocess
649
650 try:
651 subprocess.run([sys.executable, "misc/scripts/install_dlss_linux.py"], check=True)
652 except subprocess.CalledProcessError:
653 print_warning("DLSS SDK download failed; see output above.")
654 if os.path.isfile(ngx_static_lib):
655 env.AppendUnique(CPPDEFINES=["NGX_DLSS_ENABLED"])
656 env.Append(CPPPATH=[ngx_dir + "/include"])
657 # NGX headers include <vulkan/vulkan.h> — ensure Godot's bundled Vulkan headers are findable
658 env.Append(CPPPATH=["#thirdparty/vulkan/include"])
659 env.Append(LIBPATH=[ngx_dir + "/lib/linux_x86_64"])
660 env.Append(LIBS=["nvsdk_ngx"])
661 else:
662 print_warning(
663 'Building without DLSS. Run "python misc/scripts/install_dlss_linux.py" then rebuild to enable it.'
644 print_error(
645 'NVIDIA DLSS SDK not found. Run "python misc/scripts/install_dlss_linux.py" to download '
646 "it, or build with use_ngx_dlss=no to disable DLSS."
664647 )
665 env["use_ngx_dlss"] = False
648 Exit(255)
649 env.AppendUnique(CPPDEFINES=["NGX_DLSS_ENABLED"])
650 env.Append(CPPPATH=[ngx_dir + "/include"])
651 # NGX headers include <vulkan/vulkan.h> — ensure Godot's bundled Vulkan headers are findable
652 env.Append(CPPPATH=["#thirdparty/vulkan/include"])
653 env.Append(LIBPATH=[ngx_dir + "/lib/linux_x86_64"])
654 env.Append(LIBS=["nvsdk_ngx"])
666655 else:
667656 env["use_ngx_dlss"] = False
668657