GPU: Add mesh-to-compute fallback for RDNA1 #20
No reviewers
Labels
No labels
accessibility
already-solved
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
merged
needs-decision
needs-game-run
needs-rebase
not-merged
nvidia
obsolete
question
security
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/avatarmanz--VIctory-7900XTX!20
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-20"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Abdellah-Khanani on GitHub · 2026-11-25 23:38 UTC · original
Abdellah-Khanani:codex/rdna1-mesh-fallback→main· +2779 −80 · 14 files · 5 commits · draftWhat this does
Adds a mesh-to-compute path for D3D12 adapters without native mesh shaders, aimed at RDNA1 GPUs such as the Radeon RX 5700 XT. The translator emits the mesh program as compute plus a vertex shader, and the host submits generated geometry through an indirect draw. The fallback uses a dedicated compute root signature and list-owned scratch buffers.
Also declares wave64 for the fallback, keeps mesh output limits intact for compute lowering, applies the host blend-state workaround for integer render targets, and makes the fallback scratch-pool limits configurable.
Local validation
cargo build --locked --profile diag -p victory --features diagnosticssucceeds.0x80004005). The Windows D3D12 debug layer is unavailable on this machine, so the offending command is not identified yet.This is published as a draft because the first actual gameplay scene is not verified yet.
Found running the title's world through the fallback on an RX 5700 XT (RDNA1, no mesh shaders). Root signatures. The fallback made the mesh stage's parameters visible to ALL so the compute pass could see them, in the same root signature as the pixel shader. The two stages use the same registers (user data b0 in the same space), so D3D12 refused the signature ("Shader register range of type CBV (root parameter [2], visibility PIXEL) overlaps ... root parameter [0], visibility ALL"): 245 world pipelines refused, their draws dropped. Now the draw's signature keeps the mesh stage visible to the vertex shader, and the compute pass gets its own signature with the same parameters at the same indices: the mesh stage's visible to ALL, the pixel stage's moved to spaces nothing reads. The bind uses it for the compute pass, and the indirect command signatures are made on their own signature. After: 0 refused, 513 fallback pipelines made. Scratch. Every fallback draw took a new region, kept until the list was reset, and every list kept its own 64 MiB chunks: thousands of draws and dozens of lists ran the 8 GB card out of memory (1,955 E_OUTOFMEMORY in one run). Now a draw's regions are free again once it has moved its chunk back to UNORDERED_ACCESS (a transition that waits for its reads), chunks are 16 MiB, go back to a pool the lists share when a list is reset, and past 512 MiB free are released 128 list resets later. Releasing them at once gave a GPU page fault inside a freed "mesh fallback Data" buffer in one run, so the delay is a workaround for a lifetime I have not pinned down. After: 0 E_OUTOFMEMORY, VRAM steady around 7.5 GB. Co-Authored-By: Claude Opus 5.5 <[email protected]>@delacor on GitHub · 2026-11-27 12:05 UTC · original
Linux/RDNA1 progress update from our local integration on an RX 5500 XT 8 GiB with Wine/vkd3d-proton: the opening 3D room and character geometry are now visible using the compute fallback plus additional fixes. Face/shading artifacts and dropped passes remain, so this is not an end-to-end rendering correctness claim.
Our backend accepts the state-changing indirect signatures but produces no mesh work with device-generated commands disabled. Explicit output bindings and ordinary indirect compute/draw pairs restore geometry, with each pair finishing its read before output reuse. Five actual GPU regressions pass, including multiple records whose combined storage exceeds one region. Native mesh execution keeps its existing path.
We also tested an opt-in shared Data output allocator across host lists on the single DIRECT queue. Indirect command buffers stay private; group counts, layout, capacity and write/read dependencies are preserved. Earlier size allocations remain owned after growth. The existing pool already recycles output after each draw; this addresses retention across simultaneously live lists.
The application mesh-storage counter includes command buffers and free/delayed storage; it is not total GPU memory. Warm samples cover 120–410 seconds with no shader compilation (53 private, 51 shared samples). Draw counts differ (1114.42 versus 1104.31 on average), and the shared run had USB/dock hotplug messages. This supports about 95% lower final retained mesh storage, not an established FPS gain. Neither run reported an amdgpu fault/reset.
The shared-storage GPU regression records 32 lists before submission and checks reverse batched order, separate submissions, growth and exact producer/consumer output across 64 lists. It passes and retains 3 MiB in the synthetic case. Barrier/image and indirect regressions, Windows all-target checks and the app build also pass in the integration. Other GPUs, native Windows drivers and long-session behavior remain unverified.
Credit: yoraudev's alternative Marvisak #1648 already uses global intermediate storage. Our experiment adapts that idea to this fallback allocator and translator rather than introducing another emulation implementation. Its benefit is not intrinsically limited to 8-GiB GPUs, but native mesh draws bypass these buffers. No native-path 7900 XTX speedup is claimed.
These are local integration results with follow-up changes, not validation of this PR's unmodified head. The narrow follow-up patches still need extraction against the agreed fallback base; unrelated experiments and private captures/shaders/executables will be excluded. AI-assisted investigation and synthetic regression work with Codex.
Coordinating the same follow-up with Marvisak #961. This does not change the fallback dependency or establish an improvement on the native 7900 path.
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.