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:
1 parent
3345fffcd3
commit
247fe1092d
60 files changed
+7168
-66
No files matched your search
@@ -5,6 +5,11 @@ if(NOT WIN32 OR NOT CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
endif()
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
add_executable(d4r_fsr_rr_probe EXCLUDE_FROM_ALL tools/fsr_rr_probe.cpp)
|
||||
target_link_libraries(d4r_fsr_rr_probe PRIVATE d3d12 dxgi dxguid)
|
||||
if(MINGW)
|
||||
target_link_options(d4r_fsr_rr_probe PRIVATE -municode -static)
|
||||
endif()
|
||||
set(D4R_HIP_ROOT "$ENV{HIP_PATH}" CACHE PATH "One stable HIP SDK or TheRock installation")
|
||||
if(NOT D4R_HIP_ROOT AND EXISTS "C:/Program Files/AMD/ROCm/7.2")
|
||||
set(D4R_HIP_ROOT "C:/Program Files/AMD/ROCm/7.2")
|
||||
@@ -121,11 +126,20 @@ if(D4R_BUILD_NATIVE_ENGINE)
|
||||
add_library(d4r_volk STATIC "${D4R_VOLK_ROOT}/volk.c")
|
||||
target_include_directories(d4r_volk PUBLIC "${D4R_VOLK_ROOT}" "${D4R_VULKAN_HEADERS_ROOT}/include")
|
||||
target_compile_definitions(d4r_volk PUBLIC VK_NO_PROTOTYPES)
|
||||
add_executable(d4r_rr_interop_capabilities EXCLUDE_FROM_ALL tools/windows/rr_interop_capabilities.cpp)
|
||||
target_link_libraries(d4r_rr_interop_capabilities PRIVATE d4r_volk d3d12 dxgi dxguid)
|
||||
add_executable(d4r_rr_interop_probe EXCLUDE_FROM_ALL tools/windows/rr_interop_probe.cpp)
|
||||
target_link_libraries(d4r_rr_interop_probe PRIVATE d4r_volk d3d12 dxgi dxguid)
|
||||
if(MINGW)
|
||||
target_link_options(d4r_rr_interop_capabilities PRIVATE -static)
|
||||
target_link_options(d4r_rr_interop_probe PRIVATE -static)
|
||||
endif()
|
||||
add_library(d4r_engine STATIC engine/runtime.cpp engine/game.cpp engine/game_m.cpp engine/game_rr.cpp)
|
||||
target_include_directories(d4r_engine PUBLIC "${D4R_VULKAN_HEADERS_ROOT}/include")
|
||||
target_compile_definitions(d4r_engine PUBLIC VK_NO_PROTOTYPES)
|
||||
target_precompile_headers(d4r_engine PRIVATE engine/volk_pch.h)
|
||||
target_link_libraries(d4r_engine PUBLIC d4r_volk)
|
||||
target_link_libraries(d4r_rr_interop_probe PRIVATE d4r_engine)
|
||||
foreach(runner IN ITEMS k m rr)
|
||||
if(runner STREQUAL "k")
|
||||
set(runner_source engine/replay.cpp)
|
||||
@@ -187,6 +201,11 @@ set_target_properties(d4r_nvngx_windows PROPERTIES PREFIX "" OUTPUT_NAME "d4r_nv
|
||||
target_compile_definitions(d4r_nvngx_windows PRIVATE WIN32_LEAN_AND_MEAN NOMINMAX __HIP_PLATFORM_AMD__)
|
||||
target_include_directories(d4r_nvngx_windows PRIVATE "${D4R_HIP_ROOT}/include")
|
||||
target_link_libraries(d4r_nvngx_windows PRIVATE version dbghelp d3d12 dxguid minhook bcrypt)
|
||||
if(TARGET d4r_engine)
|
||||
target_sources(d4r_nvngx_windows PRIVATE tools/windows/rr_native_backend.cpp)
|
||||
target_link_libraries(d4r_nvngx_windows PRIVATE d4r_engine)
|
||||
target_compile_definitions(d4r_nvngx_windows PRIVATE D4R_NATIVE_RR_BACKEND=1)
|
||||
endif()
|
||||
install(FILES "${D4R_MINHOOK_ROOT}/LICENSE.txt" DESTINATION licenses RENAME MinHook.txt)
|
||||
if(MINGW)
|
||||
target_link_options(d4r_nvngx_windows PRIVATE -static)
|
||||
@@ -195,6 +214,13 @@ install(TARGETS d4r_nvngx_windows RUNTIME DESTINATION bin)
|
||||
# Target-independent _nvngx.dll of drag-in releases: loads _nvngx_<arch>.dll
|
||||
# for the game's actual HIP architecture. Its own D4R_TARGET_ARCH is unused.
|
||||
add_library(d4r_nvngx_loader SHARED tools/windows/d4r_nvngx_loader.cpp)
|
||||
add_executable(d4r_player_config_probe EXCLUDE_FROM_ALL tools/windows/player_config_probe.cpp)
|
||||
target_include_directories(d4r_player_config_probe PRIVATE "${D4R_HIP_ROOT}/include")
|
||||
target_compile_definitions(d4r_player_config_probe PRIVATE __HIP_PLATFORM_AMD__)
|
||||
target_link_libraries(d4r_player_config_probe PRIVATE version dbghelp bcrypt)
|
||||
if(MINGW)
|
||||
target_link_options(d4r_player_config_probe PRIVATE -municode -static)
|
||||
endif()
|
||||
set_target_properties(d4r_nvngx_loader PROPERTIES PREFIX "" OUTPUT_NAME "d4r_nvngx_loader")
|
||||
target_compile_definitions(d4r_nvngx_loader PRIVATE WIN32_LEAN_AND_MEAN NOMINMAX __HIP_PLATFORM_AMD__)
|
||||
target_include_directories(d4r_nvngx_loader PRIVATE "${D4R_HIP_ROOT}/include")
|
||||
@@ -219,6 +245,26 @@ else()
|
||||
target_sources(d4r_d3d12_dlss_probe PRIVATE "${ngx_parameter_object}" tools/d4r_ngx_param_host.cpp)
|
||||
target_sources(d4r_nvngx_windows PRIVATE "${ngx_parameter_object}" tools/d4r_ngx_param_host.cpp)
|
||||
endif()
|
||||
if(TARGET d4r_engine)
|
||||
add_executable(d4r_rr_ngx_probe EXCLUDE_FROM_ALL tools/windows/rr_ngx_probe.cpp tools/d4r_ngx_param_host.cpp)
|
||||
target_include_directories(d4r_rr_ngx_probe PRIVATE "${D4R_HIP_ROOT}/include")
|
||||
target_compile_definitions(d4r_rr_ngx_probe PRIVATE __HIP_PLATFORM_AMD__)
|
||||
target_link_libraries(d4r_rr_ngx_probe PRIVATE d4r_engine d3d12 dxgi dxguid)
|
||||
if(MSVC)
|
||||
target_sources(d4r_rr_ngx_probe PRIVATE tools/d4r_ngx_param_msvc.cpp)
|
||||
else()
|
||||
target_sources(d4r_rr_ngx_probe PRIVATE "${ngx_parameter_object}")
|
||||
target_link_options(d4r_rr_ngx_probe PRIVATE -static)
|
||||
endif()
|
||||
add_executable(d4r_rr_snapshot_probe EXCLUDE_FROM_ALL tools/windows/rr_snapshot_probe.cpp tools/d4r_ngx_param_host.cpp)
|
||||
target_link_libraries(d4r_rr_snapshot_probe PRIVATE d4r_engine)
|
||||
if(MSVC)
|
||||
target_sources(d4r_rr_snapshot_probe PRIVATE tools/d4r_ngx_param_msvc.cpp)
|
||||
else()
|
||||
target_sources(d4r_rr_snapshot_probe PRIVATE "${ngx_parameter_object}")
|
||||
target_link_options(d4r_rr_snapshot_probe PRIVATE -static)
|
||||
endif()
|
||||
endif()
|
||||
add_library(d4r_nvapi_trace SHARED tools/windows/nvapi_trace.cpp)
|
||||
set_target_properties(d4r_nvapi_trace PROPERTIES PREFIX "" OUTPUT_NAME "nvapi64"
|
||||
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/nvapi-trace"
|
||||
|
||||
Reference in new issue
Block a user