# Source SDK Requirements
This repository contains bindings, not SDK payloads. Linux and Windows OMM use
the hash-verified official 1.9.2 archives in `sdk-lock.toml`.
> [!WARNING]
> Those OMM archives do not contain `LICENSE.txt`. Redistribution requires
> obtaining the upstream license and reviewing third-party notices separately.
NRD and macOS OMM are **automatically acquired and assembled** from official
upstream ZIP archives. Every archive, including every dependency, is pinned by
SHA-256 in `sdk-lock.toml`. These hashes were computed from actual downloads, so
tags cannot silently change their contents.
Source dependencies, layout changes, and exact-match patches are included in the
cache identity. Assembly runs under an exclusive lock in a temporary directory.
It is published only after patching and required-file validation succeed.
Incomplete assemblies are not cache hits. No SDK payloads are stored in this
repository. There is no implicit Retro path or vendored-source fallback.
Normal native builds need network access once, then reuse `NVIDIA_SDK_CACHE`
(or the normal user cache). To prefetch explicitly:
```sh
cargo run -p nvidia-sdk -- verify nrd --target x86_64-unknown-linux-gnu
cargo run -p nvidia-sdk -- verify omm --target aarch64-apple-darwin
```
Use CLI `--offline`, `NVIDIA_SDK_OFFLINE=1`, or `CARGO_NET_OFFLINE=true` to forbid
downloads. A complete cached assembly works offline. A cache miss fails rather
than choosing a stub or searching another checkout.
`NRD_SDK` / `OMM_SDK` and
`NVIDIA_SDK_ROOT/<sdk>/<version>` remain explicit prepared-tree overrides and
take precedence over acquisition. Overrides are validated but never patched,
relocated, or stamped by the resolver.
Required files are checked for absence, emptiness, and Git LFS pointers. Override
provenance is not cryptographically authenticated.
> [!WARNING]
> Overrides are trusted local inputs. Cached trees are likewise assumed locally
> trusted after verified acquisition. Do not use untrusted SDK trees, which
> contain build scripts and native code.
## NRD 4.17.3
The assembled tree contains NVIDIA-RTX/NRD `v4.17.3` sources, including
`Include`, `Integration`, `Source`, `Shaders`, `Resources`, its CMake files and
license. The resolver assembles complete upstream dependency trees under `deps`,
retaining their licenses.
> [!IMPORTANT]
> Explicit overrides must provide the dependency layout below. A prebuilt NRD
> library alone is insufficient.
<details>
<summary>NRD dependency revisions and sse2neon provenance</summary>
| `deps/nri` | https://github.com/NVIDIA-RTX/NRI | `v179` |
| `deps/shadermake` | https://github.com/NVIDIA-RTX/ShaderMake | `18f5a344e7ca8fa65daaf079d07bc8ce38453e05` |
| `deps/mathlib` | https://github.com/NVIDIA-RTX/MathLib | `v11` |
| `deps/vulkan-headers` | https://github.com/KhronosGroup/Vulkan-Headers | `v1.4.349` |
| `deps/vma` | https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator | `b3cbbb43ea3a506dffe10759e205a41c27c35ae2` |
| `deps/sse2neon` | https://github.com/DLTcollab/sse2neon | `13a42df35dc7fcc94f987568e7274a998bb6cc86` |
The sse2neon commit is explicitly pinned, not resolved from `master` at build
time. Its header SHA-256 is
`44b9fa3dec3a52ea473246e04b9f692a4e5b0ed654299eef7fe7ec3049e223e0`.
It is not byte-identical to the Retro reference header
(`fab5e1be095ce8db9d2ab0c1fe0b2c6f2a34657b43ce83688e8c84224806df38`).
The audit found differences in ARMv7 movemask code and cache-flush compiler
branch ordering, not the Apple ARM64 branches used here.
</details>
Actual Apple builds still require platform validation.
`Shaders/NRDConfig.hlsli` is generated by upstream CMake. It is intentionally not
required before the first build.
Build requirements: CMake 3.30+, a native C++ compiler, and SPIR-V-capable DXC
from the Vulkan SDK (`dxc` on PATH on Linux/macOS, `VULKAN_SDK/Bin/dxc` on
Windows).
The wrapper builds NRD, NRI, ShaderMake, and the bridge statically in Cargo's
output directory. It embeds SPIR-V and forces FetchContent offline.
It uses normal encoding 4 and roughness encoding 1, matching the reference.
NRI v179's GCC `maybe-uninitialized` and Clang `inconsistent-missing-override`
diagnostics remain visible but are not promoted to errors on the NRI targets.
Native targets remain x86-64 GNU Linux, x86-64 MSVC Windows, and Apple silicon
macOS. macOS also needs the Apple SDK/frameworks and a Vulkan implementation
such as MoltenVK at runtime. Intel macOS remains an NRD stub, as in Retro.
`--no-default-features` selects the NRD stub without inspecting SDK files.
## OMM 1.9.2 on macOS
Enable the `native` feature. Both Intel and Apple silicon native-host builds
compile the CPU baker statically. Cross-target builds retain the reference's
stub behavior.
Xcode command-line tools and a C++20 compiler are required.
No GPU shader compiler or generated GPU shader blobs are needed.
<details>
<summary>macOS OMM source layout, dependency pins, and portability patches</summary>
The resolver assembles `include/omm.h`, `include/omm.hpp`, `LICENSE.txt`, and
`source/omm-lib/{src,shaders}` from NVIDIA-RTX/OMM commit
`9abacd0f187d0efca491946a29ba7df8c5345264` (`v1.9.2`), plus these dependencies:
| `source/third-party/glm` | https://github.com/g-truc/glm | `2d4c4b4dd31fde06cfffad7915c2b3006402322f` |
| `source/third-party/stb` | https://github.com/nothings/stb | `fede005abaf93d9d7f3a679d1999b2db341b360f` |
| `source/third-party/xxhash` | https://github.com/Cyan4973/xxHash | `c961fbe61ad1ee1e430b9c304735a0534fda1c6d` |
| `source/third-party/lz4` | https://github.com/lz4/lz4 | `ec86e3da5d5be185875ea44988b9373ff50bb98d` |
Use GLM's repository root (containing `glm/glm.hpp`). Place only LZ4's `lib/lz4.c`,
`lib/lz4.h`, and `lib/LICENSE` directly in the `lz4` directory.
The recipe selects these files explicitly. Copying the entire `lib/` would
introduce an older `xxhash.h` that shadows the separately pinned xxHash dependency.
Other dependency directories contain the corresponding upstream headers and
sources directly.
The recipe applies both existing portability fixes in
`source/omm-lib/src/std_allocator.h`:
- Add `#include <stdint.h>` before the vector include.
- Replace `#elif __linux__` with `#elif defined(__linux__) || defined(__APPLE__)`.
Each preimage must occur exactly once or acquisition fails. These patches affect
only the freshly extracted cache assembly, never explicit overrides.
GPU precompiled shader macros remain undefined. The reference's SPIR-V
binding-shift defines are preserved.
</details>
> [!IMPORTANT]
> Retain dependency license files. Prepared overrides must already contain both
> portability fixes described above.
On macOS, `bundled_backend_path()` returns the prepared SDK directory, not a
dynamic library. Pass it to `Baker::new` as with the reference implementation.
The compiled CPU baker does not load a runtime library on macOS.
On Linux and Windows the helper returns the resolved absolute shared-library
path. Applications must distribute the library when moved away from the SDK
cache. They must supply its deployed absolute path.
## SHARC 1.8.3
SHARC is acquired as an unmodified shader-only SDK, not a renderer abstraction
or native library. All target triples use the same `shader-source` artifact
(`targets = ["*"]`). Native SDK artifacts still require exact target matches.
No CMake, C++ compiler, source assembly, or runtime staging is involved.
<details>
<summary>SHARC archive URL and verified hash</summary>
The official archive is
`https://codeload.github.com/NVIDIA-RTX/SHARC/zip/4e21b585c33c83d723ca9a1e11bbb1090d145793`.
Its SHA-256, verified from an actual download, is
`2fce446623df71f6cb6217da300422a0b4cfb7d7dca92d8111708dc030d60b4c`.
The ZIP wraps the official tree in
`SHARC-4e21b585c33c83d723ca9a1e11bbb1090d145793/`. The resolver removes only
that archive wrapper.
</details>
`ResolvedSdk.path` is the SDK root, with this layout:
```text
<resolved.path>/
License.md
include/
HashGridCommon.h
HashGridTypes.h
SharcCommon.h
SharcGlslHelpers.h
SharcTypes.h
```
The complete upstream tree, including documentation and copyright/license
notices, is retained in the cache. All five headers and `License.md` are required
for validation.
Point `SHARC_SDK` at the SDK root, not its `include` directory.
`NVIDIA_SDK_ROOT/sharc/1.8.3` accepts the same layout.
Acquired roots are at
`<cache>/sharc/1.8.3/<archive-sha256>`, shared across targets. Overrides remain
trusted, validated, and unmodified, with the usual cache and offline rules.
```sh
cargo run -p nvidia-sdk -- path sharc --target x86_64-unknown-linux-gnu --json
cargo run -p nvidia-sdk -- verify sharc --target aarch64-apple-darwin --offline
cargo test -p nvidia-sdk --test sharc
cargo test -p nvidia-sdk --test sharc fresh_sharc_acquisition_then_offline_reuse -- --ignored
```
Before removal of Retro's retained SDK, a recursive byte-for-byte comparison
against `include/nvidia/sharc/1.8.3/include` found all five headers identical,
with no missing or extra headers. No Retro files were changed by this acquisition
migration. No SHARC payloads are checked into this repository.
> [!IMPORTANT]
> SHARC remains governed by the upstream NVIDIA RTX SDKs License in `License.md`.
> Preserve that license and header notices when redistributing.
## Streamline Hash Verification
The Streamline 2.9.0 SHA-256 is
`b7e4f31706cfacafba95d2d4abc2c9dcf2dc5fc58b2a6917c71f83051d271aa1`.
This was computed from the actual 145,132,904-byte official release ZIP and
matches GitHub release asset `286152348`'s published digest.
The prior manifest value omitted a `c` and was only 63 characters long.