From e38f9e3983baecf55067b19b58af4a11593deb54 Mon Sep 17 00:00:00 2001 From: Carter Anderson Date: Thu, 14 Aug 2025 17:02:20 -0700 Subject: [PATCH 1/5] Add cargo package metadata --- Cargo.toml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index a32ac8e..fb37213 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,6 +2,11 @@ name = "dlss_wgpu" version = "1.0.0" edition = "2024" +categories = ["graphics", "rendering"] +description = "Adds support for using DLSS with wgpu" +repository = "https://github.com/bevyengine/dlss_wgpu" +documentation = "https://docs.rs/dlss_wgpu" +license = "MIT OR Apache-2.0" [dependencies] wgpu = { version = "26", default-features = false, features = ["vulkan"] } From 8d09e157ad915974eaf2dc30037fb9542ed57f90 Mon Sep 17 00:00:00 2001 From: JMS55 <47158642+JMS55@users.noreply.github.com> Date: Sat, 6 Sep 2025 10:38:40 -0700 Subject: [PATCH 2/5] Bugfixes, version bump (#11) Fixes https://github.com/bevyengine/dlss_wgpu/issues/10. * When finding DLSS DLLs, lookup $DLSS_SDK at runtime instead of baking the path in at compile time * Remove current directory lookup for DLLs, as DLSS already does that implicitly * Fix README instructions to mention that you need both the DLSS and DLSS-RR DLLs when using DLSS-RR * Bump DLSS SDK and crate minor version --- Cargo.toml | 2 +- README.md | 23 ++++++++++++----------- src/feature_info.rs | 9 ++++----- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index fb37213..321e8b6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "dlss_wgpu" -version = "1.0.0" +version = "1.0.1" edition = "2024" categories = ["graphics", "rendering"] description = "Adds support for using DLSS with wgpu" diff --git a/README.md b/README.md index 20715a8..acb1df4 100644 --- a/README.md +++ b/README.md @@ -5,14 +5,15 @@ A wrapper for using [DLSS](https://www.nvidia.com/en-us/geforce/technologies/dls ## Version Chart -| dlss_wgpu | dlss | wgpu | -|:---------:|:--------:|:----:| -| v1.0 | v310.3.0 | v26 | +| dlss_wgpu | dlss | wgpu | +|:-----------:|:--------:|:----:| +| v1.0.1 | v310.4.0 | v26 | +| v1.0.0 | v310.3.0 | v26 | ## Downloading The DLSS SDK The DLSS SDK cannot be redistributed by this crate. You will need to download the SDK as follows: -* Ensure you comply with the DLSS SDK license located at https://github.com/NVIDIA/DLSS/blob/v310.3.0/LICENSE.txt -* Clone the NVIDIA DLSS Super Resolution SDK v310.3.0 from https://github.com/NVIDIA/DLSS/tree/v310.3.0 +* Ensure you comply with the DLSS SDK license located at https://github.com/NVIDIA/DLSS/blob/v310.4.0/LICENSE.txt +* Clone the NVIDIA DLSS Super Resolution SDK v310.4.0 from https://github.com/NVIDIA/DLSS/tree/v310.4.0 * Set the environment variable `DLSS_SDK = /path/to/DLSS` ## Build Dependencies @@ -23,13 +24,13 @@ The DLSS SDK cannot be redistributed by this crate. You will need to download th ## Distributing Your App Once your app is compiled, you do not need to distribute the entire DLSS SDK, or set the `DLSS_SDK` environment variable. You only need to distribute the DLSS DLL(s) and license text as follows: -* For DLSS super resolution: - * Window: Copy `$DLSS_SDK/lib/Windows_x86_64/rel/nvngx_dlss.dll` to the same directory as your app - * Linux: Copy `$DLSS_SDK/lib/Linux_x86_64/rel/libnvidia-ngx-dlss.so.310.3.0` to the same directory as your app -* For DLSS ray reconstruction: +1. Copy the DLL: + * Windows: Copy `$DLSS_SDK/lib/Windows_x86_64/rel/nvngx_dlss.dll` to the same directory as your app + * Linux: Copy `$DLSS_SDK/lib/Linux_x86_64/rel/libnvidia-ngx-dlss.so.310.4.0` to the same directory as your app +2. Include the full copyright and license blurb texts from section `9.5` of `$DLSS_SDK/doc/DLSS_Programming_Guide_Release.pdf` with your app +3. Additionally, for DLSS ray reconstruction: * Windows: Copy `$DLSS_SDK/lib/Windows_x86_64/rel/nvngx_dlssd.dll` to the same directory as your app - * Linux: Copy `$DLSS_SDK/lib/Linux_x86_64/rel/libnvidia-ngx-dlssd.so.310.3.0` to the same directory as your app -* Include the full copyright and license blurb texts from section `9.5` of `$DLSS_SDK/doc/DLSS_Programming_Guide_Release.pdf` with your app + * Linux: Copy `$DLSS_SDK/lib/Linux_x86_64/rel/libnvidia-ngx-dlssd.so.310.4.0` to the same directory as your app ## Debug Overlay When `dlss_wgpu` is compiled with the `debug_overlay` cargo feature, and the `DLSS_SDK` environment variable is set, the development version of the DLSS DLLs will be linked. diff --git a/src/feature_info.rs b/src/feature_info.rs index 81be72c..d213205 100644 --- a/src/feature_info.rs +++ b/src/feature_info.rs @@ -1,6 +1,6 @@ use crate::nvsdk_ngx::*; use std::{ - env, + env::{self, var}, ffi::{CString, OsStr, OsString}, ptr, }; @@ -55,8 +55,7 @@ where } fn get_shared_library_paths() -> Vec> { - // Look in current direction - let mut shared_library_paths = vec![os_str_to_wchar(&OsString::from("."))]; + let mut shared_library_paths = vec![]; #[cfg(not(target_os = "windows"))] let platform = "Linux_x86_64"; @@ -69,8 +68,8 @@ fn get_shared_library_paths() -> Vec> { let profile = "rel"; // Look in $DLSS_SDK if set - let sdk_path = option_env!("DLSS_SDK").map(|sdk| format!("{sdk}/lib/{platform}/{profile}")); - if let Some(sdk_path) = sdk_path.as_ref() { + let sdk_path = var("DLSS_SDK").map(|sdk| format!("{sdk}/lib/{platform}/{profile}")); + if let Ok(sdk_path) = sdk_path.as_ref() { shared_library_paths.push(os_str_to_wchar(&OsString::from(sdk_path))); } From 2205074c34b951e8743bb4f959d4ca5ed9549887 Mon Sep 17 00:00:00 2001 From: Alice Cecile Date: Wed, 10 Sep 2025 16:28:54 -0700 Subject: [PATCH 3/5] Cleanup mdlint violations in README (#12) --- README.md | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index acb1df4..af5d71e 100644 --- a/README.md +++ b/README.md @@ -2,26 +2,29 @@ A wrapper for using [DLSS](https://www.nvidia.com/en-us/geforce/technologies/dlss) with [wgpu](https://github.com/gfx-rs/wgpu) when targeting Vulkan. - ## Version Chart -| dlss_wgpu | dlss | wgpu | -|:-----------:|:--------:|:----:| -| v1.0.1 | v310.4.0 | v26 | -| v1.0.0 | v310.3.0 | v26 | +| dlss_wgpu | dlss | wgpu | +| :-------: | :------: | :---: | +| v1.0.1 | v310.4.0 | v26 | +| v1.0.0 | v310.3.0 | v26 | ## Downloading The DLSS SDK + The DLSS SDK cannot be redistributed by this crate. You will need to download the SDK as follows: -* Ensure you comply with the DLSS SDK license located at https://github.com/NVIDIA/DLSS/blob/v310.4.0/LICENSE.txt -* Clone the NVIDIA DLSS Super Resolution SDK v310.4.0 from https://github.com/NVIDIA/DLSS/tree/v310.4.0 + +* Ensure you comply with the [DLSS SDK license](https://github.com/NVIDIA/DLSS/blob/v310.4.0/LICENSE.txt) +* Clone the [NVIDIA DLSS Super Resolution SDK v310.4.0](https://github.com/NVIDIA/DLSS/tree/v310.4.0) * Set the environment variable `DLSS_SDK = /path/to/DLSS` ## Build Dependencies + * Install the DLSS SDK -* Install the Vulkan SDK https://vulkan.lunarg.com/sdk/home and set the `VULKAN_SDK` environment variable -* Install clang https://rust-lang.github.io/rust-bindgen/requirements.html#clang +* Install the [Vulkan SDK](https://vulkan.lunarg.com/sdk/home) and set the `VULKAN_SDK` environment variable +* Install [clang](https://rust-lang.github.io/rust-bindgen/requirements.html#clang) ## Distributing Your App + Once your app is compiled, you do not need to distribute the entire DLSS SDK, or set the `DLSS_SDK` environment variable. You only need to distribute the DLSS DLL(s) and license text as follows: 1. Copy the DLL: @@ -33,11 +36,13 @@ Once your app is compiled, you do not need to distribute the entire DLSS SDK, or * Linux: Copy `$DLSS_SDK/lib/Linux_x86_64/rel/libnvidia-ngx-dlssd.so.310.4.0` to the same directory as your app ## Debug Overlay + When `dlss_wgpu` is compiled with the `debug_overlay` cargo feature, and the `DLSS_SDK` environment variable is set, the development version of the DLSS DLLs will be linked. The development version of the DLSS SDK comes with an in-app overlay to help debug usage of DLSS. See section `8.2` of `$DLSS_SDK/doc/DLSS_Programming_Guide_Release.pdf` for details. ## Validation Errors -Due to a bug in DLSS, you should expect to see Vulkan validation errors https://forums.developer.nvidia.com/t/validation-errors-using-dlss-vulkan-sdk-due-to-vkcmdclearcolorimage/326493. + +Due to a bug in DLSS, you should [expect to see Vulkan validation errors](https://forums.developer.nvidia.com/t/validation-errors-using-dlss-vulkan-sdk-due-to-vkcmdclearcolorimage/326493). These errors are safe to ignore. From 32ef473295a08f8b63e7f5e0d62c2c96cd272b19 Mon Sep 17 00:00:00 2001 From: JMS55 <47158642+JMS55@users.noreply.github.com> Date: Wed, 10 Sep 2025 20:39:47 -0700 Subject: [PATCH 4/5] Add changelog (#13) --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..0c945c1 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,7 @@ +# v1.0.1 +* Lookup $DLSS_SDK at runtime, instead of compiling it into the binary for finding DLSS DLL locations +* Fix README instructions to mention that you need both the DLSS and DLSS-RR DLLs to use DLSS-RR +* Bump DLSS SDK to v310.4.0 + +# v1.0.0 +* Initial release From a991cf426609b4505e16ef4f3df8cc1cb1c22f87 Mon Sep 17 00:00:00 2001 From: JMS55 <47158642+JMS55@users.noreply.github.com> Date: Wed, 1 Oct 2025 11:55:52 -0700 Subject: [PATCH 5/5] Fix link to old repo (#14) Somehow a link sneaked by. --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 46f3bc1..4f38d43 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -3,7 +3,7 @@ //! This crate provides Rust bindings for integrating NVIDIA DLSS (Deep Learning Super Sampling) with the `wgpu` graphics API. //! //! ## Setup -//! See for setup instructions. +//! See for setup instructions. //! //! This crate only works with wgpu's Vulkan backend. Other backends are not supported. //!