Skip to content

Draft: native D3D12 renderer and reproducible contributor handoff - #25

Draft
NeverCookFirst wants to merge 44 commits into
mainfrom
codex/native-renderer
Draft

NeverCookFirst wants to merge 44 commits into
mainfrom
codex/native-renderer

Conversation

@NeverCookFirst

@NeverCookFirst NeverCookFirst commented Oct 6, 2026 •

Copy link
Copy Markdown
Owner

Adds an opt-in C++ native D3D12 renderer that intercepts the recompiled game’s graphics calls and uses ahead-of-time translated shader archives. LEGODIMENSIONS_NATIVE_GPU remains OFF by default; this is an experimental collaboration draft.

Included work

  • Native device/presentation, shader and placement lookup, vertex/index/texture uploads, render state, depth/resolve handling, queries and synchronization, plus bounded diagnostic tools.
  • Texture-channel and DXT3A handling, alpha/viewport and gradient compiler preparations, native DoF handling, Alt+Enter borderless toggling, and the latest polygon-offset pipeline change.
  • A tracked contributor handoff at tools/gpu-aot/COLLABORATION.md, pinned compiler reconstruction, and a standalone CMake/CTest target with 19 asset-free helper checks and Ubuntu CI.
  • The exact SDK gitlink is published in dependency draft Expose SDK dependency for experimental native renderer collaboration rexglue-sdk#1. Its committed head is 17e3675767067339581018c7e722e1d8d65de201; uncommitted SDK/dependency work is excluded.

Verified results

  • Windows native game target built with Clang 20.1.8, MSVC 14.44 headers/libs and Windows SDK 10.0.26100.0.
  • All 19 standalone helper checks passed locally on Windows and on Ubuntu CI with GCC 13.3.0, with assertions enabled in Release. Successful Ubuntu run.
  • Applying the tracked shader adaptation to pinned XenosRecomp 339af41df2c23dbe3256c1c377716b81a0e0fe6b reproduced the local patched checkout. The alpha → viewport → gradient preparation chain reproduced all ten current compiler C++/header inputs after newline normalization; the shared ABI remains 624 bytes.
  • The October4 local installed archive audit recorded main 9290 shaders/18444 linked variants, runtime 255/458, and 18993 placement-index records. These generated archives are excluded from this PR.

Linux and input limitations

  • The native game renderer cannot currently be built on Linux: game CMake explicitly rejects native GPU mode outside Windows, and the implementation uses Win32/D3D12.
  • The current AOT compiler preparation links Windows DXC .lib/.dll files and Windows dependency outputs. Native probe scripts use PowerShell/Windows APIs. No Linux native game, Wine, cross-compilation, or shader-compiler build was validated for this handoff.
  • Linux contributors can run the asset-free helper target and review/edit source. Its CI result is reported in GitHub checks; it does not validate the renderer’s image or game performance.
  • A clean clone lacks generated game C++, generated/rexglue.cmake, game data and shader banks. Build inputs must be generated separately from contributors’ own game copies. The exact runtime capture corpus is also local-only. See the contributor handoff for the dependency and input inventory.

Outstanding validation

No game was launched for publication. The last captured hub/LOTR images still contained blank portraits and rendering artifacts. The current gradient/bias combination has not been visually validated. Portraits/button prompts, actual internal 1920×1080 rendering, stable 60 FPS, three story levels/cutscenes and AMD hardware validation remain outstanding. The depth-bias helper tests establish decoding behavior, not a visual repair. Game-derived shader banks, generated code, captures, saves, and Avengers reference payloads are not published.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant