Advance native Windows RR integration, kernel tooling and local packaging

Implement native NGX feature-13 RR through a LUID-matched D3D12/Vulkan
shared-memory and timeline-fence bridge. Add owned parameter snapshots,
GPU resource lifetime handling, inherited/enhanced barriers, optional
guides, sampled input formats and depth-plane support with stencil
preservation. Separate RR initialization from the SR CUDA runtime and
expose explicit backend/model selection through player configuration.

Add synthetic bridge, snapshot and NGX lifecycle harnesses covering
camera/history/reset, parameter mutation, delayed submission, early
release, capability gating and unsupported-input rejection.

Add exact gfx11 D/E model generation, verified caches, versioned local
deployment with configuration backups, and isolated portable model
tools with pinned Python, NumPy and glslang dependencies.

Extend Windows K benchmarking and private native-cache selection.
Fix LLVM 22 emitter/helper compatibility and preserve exact-output
validation for local output-kernel optimization.

Add native FSR RR provider diagnostics, local development package
refresh tooling, installer/checker updates, FidelityFX headers and
Windows parity documentation.

Keep NVIDIA binaries, derived models and private optimized kernels out
of distributable packages. Native RR evidence remains synthetic;
game validation, FSR RR dispatch, installer integration and Linux
performance parity remain incomplete.
This commit is contained in:
ayo committed 2026-10-16 12:53:26 -04:00
1 parent 3345fffcd3
commit 247fe1092d
60 files changed
+7168 -66

No files matched your search

@@ -0,0 +1,42 @@
#pragma once
#include "ngx_windows_runtime.h"
namespace d4r::win {
// Own the complete Init contract when native RR defers the independent SR
// runtime. The caller may mutate or free its strings/path list after Init.
struct RuntimeInitialization {
ComPtr<ID3D12Device> device;
unsigned long long application;
unsigned sdk;
std::wstring data;
ngx::FeatureCommonInfo common{};
std::vector<std::wstring> paths;
std::vector<const wchar_t*> pathPointers;
ngx::ProjectIdentity project;
bool hasCommon = false, hasProject = false;
RuntimeInitialization(ID3D12Device* d3d, unsigned long long app, const wchar_t* directory, unsigned version,
const ngx::FeatureCommonInfo* info, const ngx::ProjectIdentity* identity)
: device(d3d), application(app), sdk(version), data(directory && *directory ? directory : std::filesystem::current_path().wstring()) {
if (!d3d) throw std::runtime_error("Null NGX initialization device");
if (identity) { project = *identity; hasProject = true; }
if (info) {
if (info->PathListInfo.Length > 1024 || (info->PathListInfo.Length && !info->PathListInfo.Path))
throw std::runtime_error("Invalid NGX initialization path list");
hasCommon = true;
// Runtime consumes only path and logging information. InternalData
// is opaque and must not become a deferred borrowed pointer.
if (sdk >= 0x14) common.LoggingInfo = info->LoggingInfo;
for (unsigned i = 0; i < info->PathListInfo.Length; ++i)
if (info->PathListInfo.Path[i]) paths.emplace_back(info->PathListInfo.Path[i]);
for (const auto& path : paths) pathPointers.push_back(path.c_str());
common.PathListInfo = {pathPointers.data(), unsigned(pathPointers.size())};
}
}
RuntimeInitialization(const RuntimeInitialization&) = delete;
RuntimeInitialization& operator=(const RuntimeInitialization&) = delete;
std::shared_ptr<Runtime> create() const {
return std::make_shared<Runtime>(device.Get(), application, data.c_str(), sdk,
hasCommon ? &common : nullptr, hasProject ? &project : nullptr);
}
};
}