Shaders, GPU: draw mesh pipelines without mesh shaders through a compute fallback (#3) #961
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!961
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-961"
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?
@EduBertozzi on GitHub · 2026-11-24 14:29 UTC · original
EduBertozzi:pr/mesh-compute-fallback→main· +4132 −68 · 18 files · 14 commits · openAddresses #3: drawing mesh pipelines on GPUs without mesh shaders. Performance and wave64 on 32-lane hosts are listed under Open below.
What
A mesh program can be lowered a second way: as a compute shader that writes its vertices and triangles to buffers, plus a generated vertex shader that draws them.
Shaders (
victory-shader):emit::translate_mesh_as_computereturns aMeshFallback, made of the compute form, the vertex shader and aMeshLayout.u0–u2in space 2. Each group writes its own slice, with indices offset bygroup * max_vertices.setMeshOutputCountsis left out.t0–t2. Without per-primitive outputs it is drawn indexed. With them it is drawn "expanded" (three corners per primitive, unindexed, with the record read bySV_VertexID / 3), and the pixel shader links by semantic as it does with a mesh shader.emit::mesh_output_bytesandMESH_OUTPUT_LIMITgive D3D12's 32 KiB mesh output size as the spec counts it.GPU (
victory-gpu):A mesh pipeline takes the fallback in three cases:
VICTORY_MESH_FALLBACK=1is set;The fallback is refused if the compute form would bind otherwise than the mesh form.
The compute form binds its user data, samplers and root views in spaces of its own (8 and 9,
MESH_COMPUTE_SPACES), so its ALL-visible parameters don't overlap the pixel shader's.DispatchMeshrecords the compute pass, a transition to read, the draw, and a transition back. Memory comes from a pool per list. It starts with a 1 MiB chunk, doubles up to 64 MiB, and past 64 MiB reuses its chunks from the start, which the transitions make safe.Indirect mesh dispatches go through a small HLSL pass that turns the console's argument records into dispatch and draw arguments, then two
ExecuteIndirectcalls (mesh_indirect.rs).The compute form has its own entry in the shader cache (
shader.mesh-fallback).Tools:
victory mesh-censuscounts what the title's mesh programs are made of and how they translate both ways. It prints counts only.fallback_frame_costis an ignored benchmark of the fallback's per-frame cost.Seven commits, one per step.
mesh-census(5f0b602) stands alone and can be split out if preferred.Tested
Synthetic, no game data, on Windows 10 + GTX 1060 (no mesh shaders, Agility 1.620.2 for the GPU tests) and WARP 1.0.22 (mesh shaders):
mesh_output_bytesat the 32,768-byte boundary, and the indirect argument pass on the GPU.cargo clippy --workspace --all-targets --locked -- -D warnings, with and without--all-features: clean.From testers on #3, with their own copies of the title:
State::execute_indirectmatches direct draws pixel for pixel on an RTX 5090 and on WARP. That covers indexed and expanded draws, with and without a count, and a zero count.Open
lane_index()as the mesh form, so #578's refusal and the lane-numbering work in #940 / #189 apply here too.🤖 Generated with Claude Code
@EduBertozzi on GitHub · 2026-11-24 14:33 UTC · original
Thanks @DenRakEiw. That is the first independent run of the synthetic tests on an RTX 5090 and WARP, where the fallback runs next to a native mesh shader to compare against.
AI-assisted (Claude Code).
@MichaelSmithAI on GitHub · 2026-11-24 14:44 UTC · original
The four mesh-compute tests and four indirect-argument tests passed on RTX 4090 under Wine/vkd3d-proton 3.2. The direct indexed and expanded fallback fixtures matched the native mesh pixels on that adapter. The indirect tests checked record conversion and count handling. The timing benchmark remained ignored.
A separate compute-only readback found an initialization gap when a group declares more primitives than it has lanes. With three lanes and four primitive records, the last record retained all three prefilled ones. The follow-up on this branch initializes the remaining records. Both groups then kept the expected triangle and all unused indices read zero. Five focused shader tests passed at the follow-up head. Wave64 behavior and title output remain open.
@EduBertozzi on GitHub · 2026-11-24 14:47 UTC · original
Thanks @MichaelSmithAI, that's a real bug. The fallback draws
3 * max_primitivesindices per group, so with pooled scratch, a stale record above the last lane would have drawn a stale triangle.I reproduced it on native Windows 10 (GTX 1060): with
lower.rsfrom2704a57, the new test fails with group 0's fourth record still[1, 1, 1], and with the fix it passes. Since lane n exports primitive n, slots at or above the thread count are never exported, so zeroing them can't race with a real write.Merged your fork PR into this branch. I added
13d3718on top, because CI's clippy refuseschunks_exactwith a constant size, so the test now usesas_chunks::<12>(). Clippy is clean in both CI modes, and the five mesh compute tests pass on the GTX 1060.AI-assisted (Claude Code).
@Zipettte on GitHub · 2026-11-24 15:13 UTC · original
Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at
13d3718:cargo test -p victory -p victory-gpu -p victory-shaderpasses, 187 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).Tested with AI assistance (Claude).
@zlwbbb-del on GitHub · 2026-11-24 16:55 UTC · original
Tested on an RX 470 — the report follows. The results are not encouraging.
First, thanks — the fallback does what it says. I could not find a report of it running
against title data on a GPU without mesh shaders, so here is one, with the numbers.
AI-assisted (DeepSeek). Hardware, timings and log excerpts above are as measured on this
machine; the raw logs are kept and can be attached on request.*
issue-mesh-fallback-rx470.md
@EduBertozzi on GitHub · 2026-11-24 17:23 UTC · original
@zlwbbb-del thank you, this is the first run of the fallback against the title on a GPU without mesh shaders. Both problems you found are real, and both are fixed on the branch now. Please re-run when you can.
1. Root signature overlap: fixed in
4e73e71, but not the way you proposed. Sharing one parameter between the stages would give the pixel shader the mesh stage's user data, or the other way round. Each stage has its own user data atb0, its own immediate samplers ats<n>, and its own root views at the same slot numbers. Instead, the compute form now binds in spaces of its own: user data and samplers in space 8, root views in 9 (MESH_COMPUTE_SPACES).victory-gpubuilds the mesh stage's ALL-visible parameters there when it takes the fallback, so they no longer overlap the pixel stage's. A new test reproduces your error: a compute form that reads user data, next to a pixel shader with its ownb0. In the old spaces D3D12 refuses the root signature, and in the new ones the compute pipeline builds against it. Its synthetic programs don't use root views or immediate samplers, so those two moves are covered by the same code path but not by a test of their own.2. Memory:
9398d08. You were right that it was the fallback's own buffers. Every list that made a single fallback draw kept a 64 MiB chunk per pool, and every indirect mesh draw reserved its worst case (32 MiB) in a region of its own, so dozens of lists added up to gigabytes. Now:Per list, the cost is now at most 64 MiB per pool plus one region. What I can't tell from here is how many lists the title keeps, since pools live as long as their list. If
no shader-writable bufferstill shows up, the per-list count of those warnings would tell whether a pool shared across lists is the next step.To your questions:
VICTORY_D3D12_AGILITY, no exports).a descriptor partly joined by control flow,a descriptor read from the first lane of …). They would fail as mesh shaders too.Thanks also to @Zipettte for the RX 7700 XT run at
13d3718. The new commits pass the shader and GPU suites on a GTX 1060 (Windows 10 + Agility), and clippy is clean in both CI modes.AI-assisted (Claude Code).
@L1DRE on GitHub · 2026-11-24 17:41 UTC · original
In-game test of this PR on a GPU without mesh shaders: GTX 1070 Ti 8 GB (Pascal, 32-lane waves), Windows 11 23H2, driver 582.53, title 1.0.2.1 Series X, release build. This PR was merged onto
bittertea0323/VIctory@try/wave64(#1086's stack: #189 + #940 + #737), with the #904pc_formatstand-ins and #951's root SRV windows (gangg111a3a8fe7,94908df). Env:VICTORY_WAVE64_EMULATE=emulate,VICTORY_MESH_FALLBACK=1,VICTORY_TEXTURE_MIP_DROP=2.The fallback draws the world on this card after the two fixes below: 900-1,970 draws/frame at 0.2-0.6 fps, 386 fallback pipelines, around 2 minutes in the world. After that the 8 GB run out (root SRV windows and copies, not the fallback), and the frame is black (about 470 untranslated programs). Without the fixes, no fallback pipeline was made, and then the card ran out of memory within seconds of world entry.
1. Every fallback pipeline's root signature was refused (
E_INVALIDARG)With the fallback,
HostPipeline::newgives the mesh stageD3D12_SHADER_VISIBILITY_ALLin the one root signature that the compute pass and the draw share. The pixel stage's user data is alsob0inUSER_DATA_SPACE(and its static samplers ares0...inSAMPLER_SPACE), withPIXELvisibility.ALLoverlapsPIXEL, so as soon as both stages read user data, the root signature is invalid. In the world, that was 149 of 149 fallback pipelines:The synthetic tests don't hit this, presumably because their pixel shader binds no user data.
Fix (local commit
e0a36c4,pipeline/host.rs,draw.rs,mesh_indirect.rs):VERTEXonly. The fallback VS binds nothing in those spaces, so they cannot overlap the pixel stage.MeshFallback::root. It holds the mesh stage's parameters at the same indices, re-made withALLvisibility, plus its static samplers and thenu0-u2.MeshFallback::outputsindexes into it.bind_astakes the root signature to set,&p.rootor&f.root.mesh_indirect::signaturestakes(compute_root, draw_root). The compute command signature is made against the compute root signature, and the draw signature against the graphics one.After this: 0 refusals, 386 fallback pipelines made.
2. Fallback scratch grew without bound per list: out of memory on world entry
HostList::mesh_scratch(…, ScratchPool::Data)gives each draw a region of its own until the list is reset, and a list keeps its chunks (64 MiB minimum) for good. A world list with thousands of fallback draws took GBs. On 8 GB,CreateCommittedResourcestarted failing withE_OUTOFMEMORYeven for 16x4 textures, and the device was removed less than a second later.The draw already transitions its chunk read → UAV after reading it, and that orders the next draw's writes after those reads. So for the
Datapool, each draw can start over at offset 0 of the first chunk big enough. Local commit7878d56,host.rs:MESH_CHUNKwent from 64 MiB to 4 MiB too, since with reuse a list's chunk only needs to fit its largest draw.draws_get_their_own_regions_and_chunks_come_back_after_a_resetstill passes (withrewind = false). With both changes, peak dedicated memory stayed at the card's 7.86 GB, but the out-of-memory failures moved from the fallback to the root SRV windows (no shared buffer/no sparse buffer).Two smaller merge notes:
TranslateOptionsthreaded throughtranslate_mesh_as_computeand the cache key. I addedtranslate_mesh_as_compute_with(container, options)and keyedcached_asby the Wave64 mode byte.a_mesh_program_run_as_compute_draws_what_the_mesh_shader_drawsandper_primitive_outputs_…panic with "no device with mesh shaders to compare with" on a host whose WARP lacks mesh shaders. The fallback image itself passes the coverage checks before that point.The changes are small enough to apply by hand onto this PR. I can post the full diffs if that helps.
@EduBertozzi on GitHub · 2026-11-24 17:42 UTC · original
@L1DRE thank you, this is the first report of the fallback drawing the world end to end on a Pascal card, and on the same generation as my GTX 1060.
You found the same two problems as @zlwbbb-del on the RX 470 above. Both are fixed on the branch now, in a slightly different way from yours:
4e73e71. Instead of a second root signature, the compute form binds its user data and samplers in space 8 and its root views in space 9 (MESH_COMPUTE_SPACES). The one shared root signature keeps them ALL-visible without overlapping the pixel stage'sb0,s<n>and root views. Your approach (VERTEX in the graphics root signature, plus a compute root signature with the same indices) also works. The space move keepsbind_asand the indirect command signatures as they are.9398d08. Same reasoning as yours: the read→UAV transition at the end of each draw makes reuse safe. A list's first chunk is now 1 MiB and doubles up to 64 MiB, and past a 64 MiB budget the pool rewinds to its first chunk. Yourrewindon every Data draw holds less memory still. I kept per-draw regions up to the budget so the batching discussed above (computes ahead of draws) has room later. If your peak numbers show the budget matters on 8 GB, a smaller one is a one-line change.The panic you hit without a mesh-capable WARP is fixed in
31568ce: the two image tests now skip the comparison when nothing can draw the reference. TheTranslateOptionsthreading belongs with #189, so I'll adapttranslate_mesh_as_computeand the cache key when that lands, as you did.A re-run at the branch head on the same stack would show whether the remaining out-of-memory is all root SRV windows and copies, as you suspect.
AI-assisted (Claude Code).
@L1DRE on GitHub · 2026-11-24 18:00 UTC · original
Re-ran on the PR head (
31568ce) with the same stack as before: #1086'stry/wave64, the #904 stand-ins and #951's root SRV windows. My two local fixes were reverted, so4e73e71and9398d08are the ones in use. Same card (GTX 1070 Ti 8 GB) and env:VICTORY_WAVE64_EMULATE=emulate,VICTORY_MESH_FALLBACK=1,VICTORY_TEXTURE_MIP_DROP=2. One extra line was needed after #189:options: TranslateOptions::default()in the new test'slower::Parts. With it, 152 shader tests pass and the two image tests skip as intended.4e73e71: 0 root signature or pipeline refusals, 380-410 fallback pipelines. Works here.On the budget, the cap does matter at 8 GB. Time in the world from the first frame over 40 draws until the device was removed, one run each:
MESH_POOL_BUDGET = 64 << 20MESH_POOL_BUDGET = 4 << 20(that line only)rewind(4 MiB chunks)All three end the same way. Peak dedicated usage is pinned at 7.86 GB. Then
no shared buffer(1 MiB title memory windows) andno sparse bufferfailures come (154-549 and 0-687 per run), thenno host texture, thenDEVICE_HUNG. None of the failures is a fallback scratch allocation. So you were right that what remains is the root SRV windows and copies (copies run 0.7-1.2 GB per world frame here). On an 8 GB card, though, a 64 MiB per pool per list budget takes enough of the headroom to cut the time in the world by about 3x. A lower budget, or one scaled to the adapter's budget, would help cards like this. I didn't measure the cost of 4 MiB to the batching you plan.Caveat: one run per row, loaded from an HDD, so the times have some noise, but not 3x.
@EduBertozzi on GitHub · 2026-11-24 18:16 UTC · original
On batching the compute passes, since I suggested it above: the in-game numbers say it's not worth the risk yet.
@L1DRE's GTX 1070 Ti run draws 900–1,970 draws per frame at 0.2–0.6 fps, which is 1.7–5 s per frame. The per-draw cost the benchmark measured on a GTX 1060 is about 4.5 µs, so at ~2,000 fallback draws the switching costs ~9 ms. That's under 1% of those frames. The time is elsewhere: copies and memory pressure (#1086 measured 406 ms per frame in copies alone).
Batching also means recording a draw's compute pass ahead of it.
bind_asbuilds descriptor tables and root views (with their copies of title memory) into the same list at that point, so moving the pass forward needs every one of those writes ordered before it. Without a capture to check against, that's easy to get wrong. So I'm leaving it until frames are down in the tens of milliseconds, where 9 ms would matter, and someone with the title can check its output. The benchmark (fallback_frame_cost) is in the branch to measure it then.AI-assisted (Claude Code).
@zlwbbb-del on GitHub · 2026-11-24 19:09 UTC · original
Re-ran on
31568ce. Both fixes hold on an 8 GB card with no mesh shaders, and there is one new crash worth your attention. Full numbers are in the attached report.Fixed, verified: E_OUTOFMEMORY 7570 → 0, no shader-writable buffer 186–746 → 0, root signature overlap 165 → 0. The fallback now takes 852–904 mesh programs, and the stages that used to die at ~70 s run 5 minutes and more without a memory failure. With the pool cap there is not a single no shader-writable buffer in the run, so the per-list count you asked about has nothing to report yet.
You were right about my proposed root signature fix and I was wrong — sharing one parameter would give the pixel shader the mesh stage's user data. Spaces 8/9 are the correct shape.
New: 0x80000003 (EXCEPTION_BREAKPOINT) at victory-image+0x5149aec, 14 occurrences on this head, absent on
13d3718. It happens with both --unimplemented trap and --unimplemented zero, so it is not an unimplemented import; the lines just before it are ordinary fallback work. Can you reach +0x5149aec in the disassembly, or do you want the dump? The title writes its own minidump and VIctory blocks the upload, so I can copy it out.The title was still in its opening sequence (credits rolling, prologue unfinished) for the whole run, so I cannot yet claim the world geometry is right. Screen sampling did show real output: richest frame 93.67 % non-black with 8898 colours, the only strong colour being (255,102,225) at 25,716 px bounded to x[104..494] y[614..816] (bottom-left, minimap position). Draws per frame went 346 → 948 → 1831 → 2341 → 2930 → 3323, with 53 % submitted at the last counted frame — the other 47 % matches the 481 programs that do not translate here (up from 86–259, because the run gets much further now).
Host: Windows 10 LTSC 19045, i5-11400H, 63.6 GB, Radeon RX 470 8 GB (Polaris, no mesh shaders), driver 31.0.21925.1001, title 1.0.2.1, Series X, VICTORY_MESH_FALLBACK=1, stock settings.xml. I had to add the Agility opt-in myself (the #175 exe-export shape; the branch has neither that nor #969's VICTORY_D3D12_AGILITY), nothing else changed.
Happy to re-run on any instrumented build — this card is a clean no-mesh host and the memory problem is out of the way now.
AI-assisted (DeepSeek). Every number above comes from the run's own log; the log and the sampled frames are kept and can be attached on request.
report-rx470-en.md
@EduBertozzi on GitHub · 2026-11-24 19:10 UTC · original
@zlwbbb-del thank you, that's the confirmation the fixes needed: no out-of-memory errors at all, no refused root signatures, and 5 minutes or more instead of ~70 s.
The new breakpoint isn't from the fallback. It's the title's own stop at
+0x5149aecthat #698 traced on NVIDIA with native mesh shaders, where the same stack ends in the same address. There, the title's crash report showed itsINSTANCE_LISTpool exactly full (45000/45000). The likely mechanism, as reported in #698: dropped draws never retire their instances, so the pool fills and the title asserts. Your run only reaches it now because13d3718died of memory at ~70 s first. To check it's the same here, see whether the title's crash report (temp\*.crash.login the data folder) showsINSTANCE_LIST 45000/45000.From the runs in #698, the drops that fill it come from untranslated programs. Fixing the four culling shaders refused as
a structured buffer of unknown stride(#704 with #193) removed the breakpoint there: 11+ minutes with no stop. With 481 programs not translating in your run, adding those two would show whether the RX 470 gets past it too.On the dump: please don't attach or upload it. The title's minidump holds its memory, which
docs/asset-policy.mdkeeps out of the repository and its issues. I don't need it for this, and I can't look up title addresses myself.AI-assisted (Claude Code).
@fuzeofficlal on GitHub · 2026-11-24 20:06 UTC · original
Tested the mesh-to-compute fallback stacked with Wave64 emulation (
#189) and#940across NVIDIA GeForce RTX 5090, AMD Radeon(TM) Graphics (RDNA2 iGPU), and Microsoft D3D12 WARP (VICTORY_D3D12_DEBUG=1), with two integration findings verified infuzeofficlal/VIctory@39cddd6:ms_6_6on 32-lane RDNA hosts (emit/lower.rs): Checkingif self.s.wave_size != Some(self.wave())(rather thanif self.s.mesh.is_some()alone) emitsWAVE_OPS+WaveGetLaneIndexboth when a Wave64 mesh program runs on a nativems_6_6RDNA adapter whose default mesh wave is 32 lanes and when lowered through the Wave32 compute fallback.shader_cache.rs): IncludingTranslateOptions { wave64 }inMESH_FALLBACK's cache key prefix prevents staleNativevsWave32/Emulatecompute-fallback blobs from colliding across launches.@EduBertozzi on GitHub · 2026-11-24 20:07 UTC · original
Thanks @fuzeofficlal. Both are right, and both only exist once #189 (and #940) are underneath, since
mainhas neitherTranslateOptionsnor the Wave64 modes:lane_index(). The compute form goes through the same function (s.meshstays set whenmesh_as_computeis on, see my note on #940). So a condition keyed on the wave size, as in your39cddd6, covers nativems_6_6on 32-lane RDNA and the fallback in one place.Nativeblob and aWave32/Emulateblob collide across launches.When #189 lands I'll rebase onto it and add both, crediting your commit, so this PR doesn't depend on an unmerged one in the meantime.
AI-assisted (Claude Code).
@elderdragon0 on GitHub · 2026-11-24 21:06 UTC · original
Independent native Windows test of #961 at
31568ce. Windows 11 build 26300, Radeon RX 5700 XT (RDNA 1), AMD Adrenalin 26.11.2 (driver 32.0.21045.29003), Rust 1.98.1 MSVC, DXIL validator 1.9.2609.D3D12 reported Shader Model 6.6, mesh shader tier 0, and wave sizes 32–64 on the RX 5700 XT. Both synthetic fallback image tests ran on hardware and matched the native mesh shader reference from WARP.
victory-shader,mesh_compute_tests: 6 passed, 0 failed, 1 ignored benchmark.victory-gpu,mesh_indirect::tests: 4 passed, 0 failed, including GPU readbacks for indexed, expanded, and count-limited indirect records.victory-shaderand 59 forvictory-gpu, with zero failures. Four shader comparison checks reported internal skips because the required compilers were unavailable.Synthetic fixtures only. AI-assisted.
@EduBertozzi on GitHub · 2026-11-24 21:06 UTC · original
Thanks @elderdragon0. It is the first RDNA 1 run, and that card matters for this path: its waves go up to 64 lanes, so the title's wave64 mesh programs can run as compute there as written, without the 32-lane emulation NVIDIA needs. It would be a good card for a run with the title too, if you have it.
AI-assisted (Claude Code).
@elderdragon0 on GitHub · 2026-11-24 21:36 UTC · original
Retail follow-up on native Windows 11 build 26300, RX 5700 XT 8 GB (RDNA 1), AMD Adrenalin 26.11.2, title 1.0.2.1. Fresh save and cache, native D3D12, diagnostics build with DRED enabled.
31568ce) stopped before the window opened with Windows commit-limit error 1455.2fb7a8b). The first-run menus displayed at about 30 FPS. After setup, the run reached up to 2,945 draws/frame. The world frame I observed was black.0x8007000E. The process exited with0x887A0005about two minutes after the first fallback translation.Aggregate diagnostics only. AI-assisted.
@elderdragon0 on GitHub · 2026-11-24 22:05 UTC · original
Retail A/B on RX 5700 XT 8 GB, Windows 11 build 26300, AMD Adrenalin 26.11.2. Both runs used Series S, #961 (
31568ce) + #211 (2fb7a8b), native D3D12, DRED, fresh caches, and copies of the same save. The only source change wasMESH_POOL_BUDGET. One run per setting.Both runs exited with
0x887A0005. The 4 MiB run lasted longer by the draw-count measure, with similar dedicated memory use and more allocation failures. Windows reported different commit limits during the two runs, so the time difference needs replication. Aggregate diagnostics only. AI-assisted.@michi-feny on GitHub · 2026-11-24 23:11 UTC · original
I tested the synthetic mesh-compute fallback on a Radeon RX 5700 XT (8 GB, no mesh shaders) under native Windows 10 Pro 19045, AMD driver 32.0.21045.29003, with Rust 1.98.1 MSVC. The local checkout combined this PR at
31568cewith Agility PR #969 atf3457f8, using Microsoft's D3D12 Agility SDK 1.620.2 viaVICTORY_D3D12_AGILITY. No title files or executable were used.cargo test -p victory-shader --lib mesh_compute_tests -- --nocapture --test-threads=1: 6 passed, 0 failed, 1 ignored benchmark. The RX 5700 XT was detected without mesh shaders, and the compute fallback rendered the synthetic triangle and passed the pixel checks. The native mesh comparison could not run: this hardware has no mesh shaders, and WARP did not expose an SM 6.6 device here.cargo test -p victory-gpu --lib mesh_indirect -- --nocapture --test-threads=1: 4 passed, 0 failed.One Windows 10 integration issue surfaced when combining #961 with #969: the first shader test run had 5 failures because two helpers in
mesh_compute_tests.rsstill used the in-boxD3D12SerializeVersionedRootSignature, which rejected the heap-indexing root-signature flags. In my local checkout, changing those two calls to #969'sagility::serialize_versioned_root_signaturemade the six active shader tests pass. This change is local and has not been pushed; it depends on #969's helper.These results cover only the synthetic tests on this GPU. They do not establish title compatibility, world rendering, or performance.
@Witredd on GitHub · 2026-11-24 23:37 UTC · original
Tested on an RX 5600 XT (RDNA1, no mesh shaders), Ryzen 7 5700X, 16 GB RAM, Windows 11, at
31568ceas is (not merged with main).cargo test -p victory-shader -p victory-gpu mesh: all 21 pass (the mesh-shader comparison skips without a mesh device).fallback_frame_cost(release):In game, own copy:
fallback=true; 360 mesh pipelines bound during the world load, ~1,400 draws/frame at ~2.4 s/frame, no device loss. Both runs ended on the loading screen (it goes black, then the run stops) on E_OUTOFMEMORY: dedicated memory filled (5.8 of 6 GB), shared rose from 1.5 to 7.5 GB (limit ~8 GB on 16 GB RAM), private 18.3 GB, then thousands of failed allocations (no shader-writable buffer1–32 MiB,no shared buffer,no upload buffer) anda host command list did not close (0x8007000E). That is the memory limit of #880 / #1226 on a 6 GB card with 16 GB RAM, not something in this PR.8 mesh programs were refused as compute: descriptor from the first lane of computed VGPRs ×4, scalar memory read as data ×2, lane mask read as data, structured buffer of unknown stride.
@Marvisak on GitHub · 2026-11-25 00:30 UTC · original
Automated triage for the maintainers.
Needs rebase. This PR does not merge cleanly into current
main(ac2525d). Conflicting files:apps/victory/src/main.rs,crates/victory-gpu/src/draw.rs,crates/victory-gpu/src/host.rs,crates/victory-gpu/src/pipeline.rs,crates/victory-gpu/src/pipeline/host.rs,crates/victory-gpu/src/shader_cache.rs,crates/victory-shader/src/emit/host.rs,crates/victory-shader/src/emit/mod.rsand 2 more.The content has not been reviewed yet; it will be once the branch is rebased onto
main.Generated by Claude Code
@ElSeba0811 on GitHub · 2026-11-25 04:45 UTC · original
I'm working on getting this running on a GTX 1070 Ti and wanted to share something that helped with wave64 on 32-lane hardware.
These results are from our local compute + vertex fallback on
ffe310e, with additional guest-wave changes. I haven't tested this PR's exact head (31568ce), so this isn't an approval of the branch. My setup is Windows, GTX 1070 Ti, i7-9700K and 16 GB RAM.We hit the 32 KiB shared-memory limit because every ballot/election site got fresh scratch space. Reusing one predicate/value workspace brought it down to 512 bytes for 64 threads or 1,024 bytes for 128 threads. It needs both the write-to-read barrier and a barrier after all reads, before reuse. Every physical thread must reach the collective; putting that barrier in divergent control flow isn't safe. Guest LDS still counts toward the limit.
On the same 8,765 mesh programs, matched by identity:
The regression test uses 97 ballot/election sites with changing predicates and first-active lanes. The old allocation fails; the fix passes exact GPU readback on the GTX and WARP, with 64/128-thread groups and four dispatches per configuration. Nine guest-wave GPU tests and three mesh record/pixel tests also passed.
A separate scalar-SRV size-query fix later brought the count to 7,255/8,765, another 21 with zero losses. The largest remaining refusal group is 1,086 cyclic programs; our local guest-wave scheduler still refuses loops.
This hasn't given us a correctly rendered world or a measured FPS gain yet. But the long, changing collective sequence caught something that a single ballot test missed, so it may be useful for the wave64 work here.
AI-assisted with Codex and Claude. Sharing aggregate results and synthetic-test details only; no game files or extracted shader code.
@zlwbbb-del on GitHub · 2026-11-25 05:13 UTC · original
Do you plan to rebase onto current main? I tried against
940d32fon the 8 GB no-mesh host and the merge is no longer mechanical: 12 files, 46 conflicted hunks. Fourteen are independent additions; the other 32 interleave inside the same functions, because today's main added root UAV handles, memory views, view marks and geometry shaders to the same Shader struct and the same handle constructors where the fallback adds mesh_out/mesh_in.I can't shortcut it either — those new fields are used 14–67 times elsewhere (root_uavs 39, view_marks 67, MEMORY_SPACE 40), so keeping this branch's side of those files stops the crate compiling. I would rather wait for your rebase than hand-merge the shader emitter and hand you a tree that may be wrong exactly in the fallback path.
Worth doing now: on
940d32fthis host went from 481 non-translating programs to 11, andcd94d35is in, so the fallback would start from a far better place.This merge attempt and the build/run on the 8 GB card were done with AI assistance (DeepSeek).
@ElSeba0811 on GitHub · 2026-11-25 07:50 UTC · original
@zlwbbb-del yeah, I’ve now ported our separate GTX fallback onto
940d32fand opened draft #2203. The old version is preserved, and the new branch keeps main’s root UAVs, memory views, view marks and helper-lane handling.The code, handwritten tests and build instructions are public now: updated branch.
It builds, and the focused fallback checks pass on our GTX 1070 Ti and WARP. The latest shader fixes also add 867 vertex and 735 compute validation passes. Two known GTX shader-test failures still reproduce on untouched
940d32f; those are documented in the PR.I’m keeping it a draft because we still need a successful rendering test. Our first run of this exact build hit the system-memory guard before we could assess the scene, so I’m not claiming playable output yet.
AI-assisted with Codex and Claude.
@zlwbbb-del on GitHub · 2026-11-25 09:45 UTC · original
@ElSeba0811 Following your #2203 here: I built it and ran it on a Radeon card, and it does render — with two
AMD-side problems afterwards.
Host: Windows 10 IoT Enterprise LTSC 19045, i5-11400H, 63.6 GB, Radeon RX 470 8 GB (Polaris,
no mesh shaders), driver 31.0.21925.1001. Built the diag profile as the doc says and ran with
VICTORY_MESH_COMPUTE=1 VICTORY_MESH_WAVE64_DAG=1 VICTORY_MESH_INDIRECT=1 VICTORY_SNAPSHOT_POOL_MIB=128.I had to add the Agility opt-in to run it on Windows 10 (exe exports, the #175 shape); the branch
has neither that nor #969's
VICTORY_D3D12_AGILITY. Nothing else changed.It got past the memory guard and rendered
E_OUTOFMEMORYat all, so the16 GB guard that stopped your first trial is a property of that machine, not of the build.
draws=3549 drawn=3549— 100 %submitted.
experimental compute and vertex mesh pipelinecreations, with-wave64-dag-compute-fallbackon 5 programs and
-wave64-dag-vertex-fallbackon 4.experimental indirect compute and vertex mesh draw recorded (GPU dimensions) count=1.Rendering evidence. The queue reports a black frame, then the level histogram of the frames
after it:
So frames 925 and 2007 carry real, non-black content (levels 44–61 of 255). I cannot judge whether
it is a correct scene from a histogram alone, but it is no longer a black screen.
Two problems, both on the AMD side
1. It dies in AMD's shader compiler. After about 100 s:
The lines immediately before it are successful fallback pipeline creations, not a bad call:
So it looks like a later DXIL compile inside
amdxc64that the AMD compiler cannot handle. If youwant to chase it, the shader compiled just before the fault is the one to try isolating — I can
re-run with a build that logs the container hash before each compile if that helps.
2. The descriptor-heap limit is hit hard on this card. 310,723 warnings of
which matches the "remapping excess title descriptors is unfinished" note in your description.
This is by far the most common message in the run.
Summary
Your port does initialise, translate everything, submit every draw and produce non-black frames on
a Polaris card — so the rendering test you are waiting for can at least be marked as reached on
this configuration, with the caveat that it ends in the AMD compiler rather than in the fallback.
Happy to re-run on any instrumented build, or to try a specific shader-hash isolation if that
narrows the
amdxc64fault.This build, run and analysis were done with AI assistance (DeepSeek). No game files, extracted
shaders, binaries or raw logs attached; the figures are from our own log.
@AtsonMelo on GitHub · 2026-11-26 01:14 UTC · original
RX 470 (Polaris) - Independent mesh fallback validation
We have been testing a semantic port of PR #961 on a
low-memory system.
Hardware:
Synthetic hardware validation:
reported validation runs.
Aggregate mesh pool memory
Measured with 24 command lists:
Reducing the individual limit from 64 to 8 MiB saved
480 MiB in this synthetic workload.
However, individual pool limits alone do not sufficiently
constrain aggregate memory usage.
A global budget, fence-aware reuse and safe reclamation
of idle chunks may benefit GPUs with limited VRAM.
Additional Polaris shader findings
Nine compute memory tests previously failed with
PSO creation errors (E_INVALIDARG).
The translated DXIL requested WaveSize(32), while
the RX 470 reported support for wave64 only.
Allowing eligible single-wave compute groups using LDS,
without incompatible cross-lane operations, to execute
on wave64 recovered all nine tests.
These findings are from our local AMD-based candidate
and have not yet been validated against current upstream.
All results are from synthetic tests, not gameplay
benchmarks.
Development was AI-assisted using ChatGPT and Claude,
with validation on physical target hardware.
Credit to the original VIctory contributors and the
authors of PR #961.
We are investigating aggregate memory budgeting and
can provide isolated patches and regression tests
for review.
@ElSeba0811 on GitHub · 2026-11-26 02:05 UTC · original
@AtsonMelo thanks for sharing this. We're working on the GTX 1070 Ti side (8 GB VRAM, 16 GB system RAM) in #2203, so the aggregate-memory result is relevant to us too.
Our last completed Series X trial reached partial scene geometry, but with large black/overexposed regions and only about 1.2–1.6 FPS in the final logged intervals. It ran for 582.28 seconds including loading and stopped at our system commit guard, with 23.29 GiB peak process private commit. That is committed process memory, not VRAM, and we haven't isolated how much belongs to the mesh pools. This was a separate local fork candidate, not the public head of #2203 or an upstream benchmark.
Your 24-list result is a useful reason to measure allocation across all lists instead of treating each pool's cap as a global limit. I'd be interested in the isolated budget/reclamation patch and its regression test. In particular, it would help to distinguish:
Reclamation/reuse needs to wait for the relevant work to complete and preserve draw ordering. We haven't implemented or measured a global mesh-pool budget here yet.
We also have new shader results that may help with shared capability checks, although our wave-width problem is the opposite of yours: this GTX has fixed 32-lane waves, while some translated programs still require 64.
Those repairs are still local/uncommitted on our separate
a486526fork base, not published in #2203, and have not had a game run. They don't establish correct lighting or playable FPS. Your wave64-only fix also needs its own eligibility checks; these GTX results aren't validation on Polaris.Please share the patch/test branch and exact base when ready, including what the aggregate-memory counter measures. That would let us compare the same synthetic workload across Pascal and Polaris without mixing it with game-performance claims.
AI-assisted with Claude Code and Codex; no game assets or extracted shaders attached.
@DenRakEiw on GitHub · 2026-11-24 14:32 UTC · original · approved these changes
Tested merged cleanly onto
main(ffe310e) on Windows 11 x64 (Rust 1.98.1 MSVC) with NVIDIA GeForce RTX 5090 (Blackwell) and WARP:cargo test -p victory-gpu: 57 passed, 0 failed, 1 ignoredcargo test -p victory-shader: 126 passed, 0 failed, 2 ignored (including all 3 newemit::mesh_compute_tests::*tests on RTX 5090 and WARP)cargo clippy -p victory-gpu -p victory-shader --all-targets: 0 warningscargo xtask policy: ok (160 files ok)Impressive compute-fallback lowering for mesh pipelines; all mesh-as-compute readback and draw parity tests pass cleanly on RTX 5090 + WARP. Approving.
AI-assisted (Gemini 4 Neon).
@AtsonMelo on GitHub · 2026-11-26 11:40 UTC · original
Polaris RX 470 - Follow-up validation and memory optimization
Following our previous independent validation of the
mesh fallback, we have consolidated two additional
local experimental builds.
Hardware remains unchanged:
Aggregate mesh pool memory
Synthetic benchmark using 24 command lists:
The combined changes saved 624 MiB compared with
the original reference configuration (43.3%).
The implementation uses region-sized chunks,
fence-aware reuse and reclamation of idle chunks.
The aggregate ceiling is intentionally soft:
allocations may exceed it when necessary to
preserve draws.
No draws were refused in this benchmark.
These values describe mesh pool memory, not
total application VRAM usage.
Additional Wave64 compatibility
The previously reported texel_offsets failure
was resolved for eligible single-wave groups
using intra-wave reads.
Local Polaris 003 validation:
Ignored and filtered tests remain.
Multi-wave equivalence is not yet established.
Additional performance experiments
Our subsequent Polaris 004 candidate includes:
Root CBV scratch reuse:
Synthetic repeated-binding workload:
12.65 MB to approximately 262 KB copied
per submission.
Readback equivalence was reported on WARP
and physical RX 470 hardware.
Demand-based pipeline prioritization:
In a synthetic workload with 96 new PSOs,
priority pipeline waiting time decreased
from 6.7-11.9 seconds to 0.8-1.7 seconds.
Reducing worker counts made cold compilation
approximately 24% slower on our CPU.
Therefore, the original worker counts remain
the default.
GPU regression validation:
142 tests passed in the final reported RX 470
run, with no TDR or device removal observed.
A pre-existing intermittent atomic file-write
test remains under investigation.
Shader suites were not repeated for this build.
Scope and limitations
All results are from local synthetic validation.
These changes have not been rebased or validated
against current upstream. No gameplay performance
or full application compatibility is claimed.
We are now developing an integrated synthetic
graphics workload to exercise the compatibility
layer and identify actual CPU/GPU/memory bottlenecks.
Isolated patches and regression tests can be
prepared for upstream review, starting with the
mesh pool allocation and reclamation changes.
Credit to the original VIctory contributors,
the authors of PR #961, and AvatarManz for
relevant performance optimization references.
Development was AI-assisted using ChatGPT,
Claude Code and Codex, with local validation
on physical target hardware.
@AtsonMelo on GitHub · 2026-11-26 11:53 UTC · original
@ElSeba0811 Thanks for the detailed feedback and for sharing your Pascal validation results.
I've just published our updated Polaris 003/004 results above.
I agree that sharing an isolated memory-budget patch and a common regression workload would be valuable for comparing Pascal and Polaris.
We are currently validating an integrated synthetic graphics workload. Once this milestone is complete, we can prepare the isolated patch, exact base commit, regression tests, and memory counter definitions for cross-hardware validation.
Thank you for collaborating.
@AtsonMelo on GitHub · 2026-11-26 12:17 UTC · original
Eu gostaria de saber onde posso baixar o executável disponibilizado recentemente pelo Cyberleek
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.