| … | … | @@ -641,28 +641,17 @@ if env["use_ngx_dlss"]: |
| 641 | 641 | # The static link library doubles as a sentinel that the SDK has been installed. |
| 642 | 642 | ngx_static_lib = "thirdparty/ngx/lib/linux_x86_64/libnvsdk_ngx.a" |
| 643 | 643 | 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." |
| 664 | 647 | ) |
| 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"]) |
| 666 | 655 | else: |
| 667 | 656 | env["use_ngx_dlss"] = False |
| 668 | 657 | |