[GPU][HLE] Hardware ray tracing: DXR 1.1 structures for XboxBvhBuilder and traversal loops lifted to RayQuery (VICTORY_HW_RT, off) #3706
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!3706
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3706"
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?
@dyshay on GitHub · 2026-11-30 04:23 UTC · original
dyshay:pr/hardware-rt→main· +13991 −23 · 37 files · 12 commits · merged 2026-11-30 14:12 UTCCloses #3704.
What it changes
Off by default: nothing changes unless
VICTORY_HW_RT=1is set. With it, on a card with DXR 1.1:victory-shader,emit/rayquery.rs, mounted inlower.rs): the console's traversal loops of the title's ray-tracing compute programs (image_bvh64_intersect_rayloops, andimage_bvh_intersect_raypairs) become DXR 1.1RayQuerycode where every value they leave behind is accounted for. A loop that is not keeps the software walk (intersect.rs), loop by loop; a program whose lifted form the lowering refuses is lowered again without lifting, whole.shader.rsgets theRayQueryDXIL calls and rootRaytracingAccelerationStructureSRVs att230..=t241(230-249 are free in this tree; the original'st240..collides with our 250-252 views), shader flag bit 25.HostShader.ray_queriesrecords what was lifted; the shader cache keys on the switch only when it is on and stores the record after the rest only for a program that has one, so existing caches are served as before.victory-gpuhwrt.rs,victory-hlemodules/xboxbvh.rs): the title'sXboxBvhBuilder.dllis replaced by an HLE module (its 12 exports by name; no title bytes, no loader hooks). Its calls become host bottom and top levels keyed by the console structure's GPU address: refits, a scratch pool, an empty top level until one is built, an instance-remap compute pass, the quantised-vertex and meshlet-index decoders, eviction when the title frees memory, and title memory materialised beforeVirtualQuery(so soft views do not hide the vertex and index buffers). Its operations go throughlist::external(in the list's order withVICTORY_THIN), and the title's compute binding is set again after the remap dispatch.draw.rsbindst230..t241to the host structure named by the table's descriptor; the descriptor heap gets RTAS views and refreshes them.VICTORY_BVH_BUILDER=1: the DLL is replaced, so the title's builder cannot run. With both set the hardware path is kept and the builder's switch is made0at load, with a warning. The pipeline left-outs treat the hardware path as the builder (CS_RaytracingResolveand the dead-RT policy keep running).ambient.rs,mirror.rs) stand aside when the hardware path is up, as they do when the builder runs (pipeline::rays_found). Unchanged without the switch.ray queries lifted N of M (bvh64 a/b, bvh32 c/d), fell back: <reason>; every five seconds, programs lifted whole / partly / not at all with their dispatches a frame, and BLAS/TLAS live, builds, refits, evictions and structure memory.VICTORY_HW_RT_WHY=1(=2: more) logs why a loop is not lifted;VICTORY_HW_RT_REFIT=0rebuilds dynamic bottom levels instead of refitting them.Not taken from the source branch: its replaced translator crate as a whole (only the lifting is mounted here), its loader hooks, its
indirect.rsvendor change, its panel HUD, its adapter choice inemit/host.rs, and the diagnostics breadcrumbs (a stub there). Manley.B's texture re-register (c8f08560), which the source branch carried in the same commit, is already inmain.How it was tested
Unit tests (CPU and WARP):
RayQueryprogram asemit_ray_querybuilds it validates indxil.dlland makes a compute pipeline on WARP with the structure as root SRVt230;hwrt.rs);known-shaders.bin(VICTORY_KNOWN_SHADERS, never in the repository): on one PC's cache, 64 ray-tracing programs, 50 lifted whole, 6 partly, 7 not at all (bvh64 loops with two node tests each), 1 not translated; loops lifted bvh64 58 of 98, bvh32 299 of 315; every lifted program validates.On the card: RTX 4090, Windows 11, diagnostics build, the house scene, 300 s each,
VICTORY_HW_RT=1 VICTORY_BVH_BUILDER=0againstVICTORY_BVH_BUILDER=1:Every hardware run: 13 ray-tracing programs lifted whole, none fell back, 4,193 bottom levels live, no device loss. The software walk's spread comes from a slow state: after a camera cut six traversal programs take 2 to 9 times as long.
Checks on this branch: the three code commits apply onto
mainwithout conflicts; it builds with--profile diag --features diagnostics; the targeted tests pass (victory-shaderrayquery/intersect/bvh: 31,victory-gpuhwrt,victory-hle). The fullcargo test --workspaceand the-D warningsclippy gate were not run here (mainalready fails-D warningsinvictory-shaderandvictory-loaderbefore this change).Not tested: other NVIDIA generations, AMD RDNA 2+, cards with 8 to 12 GB (bottom-level memory), Linux/Proton. The issue lists what would help.
Checked for overlap
Searched open and closed PRs and issues for hardware DXR,
RayQuery,xboxbvh,XboxBvhBuilder, dakisback2, HWRT,VICTORY_HW_RT, DXR 1.1, hardware ray tracing, RT cores,TraceRayInline, acceleration structure and BLAS:XboxBvhBuilderprograms take over half of the card's frame on an RTX 4090; it reports native DXR prototype results but no PR came from it. This PR replaces those programs with host DXR builds.VICTORY_BVH_LOG=1, notes what the title's builder is asked) and #3265 (the builder's geometry buffers made ready before it reads them): the software builder, which this leaves as it is when the switch is off. If #3071 lands first, its HLE notes andxboxbvh.rsboth serveXboxBvhBuilder: only one of them can be registered at a time, and this one only withVICTORY_HW_RT=1.hwrt.rs,xboxbvh.rsorrayquery.rs.Provenance
hwrtat 7fdb87fa): 570a7f7c (the translator with theRayQuerylifting), 61e389e0 (hardware DXR 1.1 and its glue), 5f55bca8 (title memory materialised beforeVirtualQueryunder soft views), and that repository'sPROVENANCE.md.c8f08560(texture re-register), which is already inmainand not part of this PR.Reg::Vwidth, root slotst230..t241,list::externalin place of a list op of its own, exclusivity withVICTORY_BVH_BUILDER, the stand-ins, the counters and the tests above.AI-assisted: the port, the adaptation and the tests were written with Claude Code (Anthropic) at my direction; I reviewed the changes and ran the measurements above on my card.
Co-authored-by: dakisback2 [email protected]
Co-authored-by: Leslie-d-a [email protected]
🤖 Generated with Claude Code
https://claude.ai/code/session_01PVi6XmTj4ohPL7QwUeFgV4
@eleboucher on GitHub · 2026-11-30 05:20 UTC · original
Tested on an RTX 4070 Ti SUPER 16 GB (Windows 11, 9800X3D, 16 GB RAM), native 1440p, no upscaling, diagnostics build of this PR's head
5046243b, Series X profile. Shaders and pipelines warmed withVICTORY_HW_RT=1first.VICTORY_HW_RT=1 VICTORY_BVH_MISS=0 VICTORY_ACTIVATE_RAYS=1VICTORY_BVH_BUILDER=1(software walk)The last hardware RT counter line before the removal:
The first failure the layer logged was a resource creation refused with the device already removed, so the removing command itself is not named. AS memory was 389 MB at the last counter line (no card-memory sample was taken before the removal). I can rerun with
VICTORY_D3D12_DRED=1orVICTORY_D3D12_DEBUG=1if that helps narrow it down.@eleboucher on GitHub · 2026-11-30 05:32 UTC · original
Rerun with
VICTORY_D3D12_DRED=1, same build and settings: it reproduced. Device removed (0x887A0005) about 3.5 min into play, after 8.2 fps / 2,089 draws a frame at t=120 s (card 13.8 GB in use, 3.9 GB shared at that sample). The layer printed no DRED breadcrumbs or page-fault data: the first thing that notices the removal is a buffer creation (no upload buffer ... 0x887A0005), and that path does not query DRED, so the removing command is still unnamed. Two removals in two hardware-path runs here; the software walk on the same build ran 10 min without one.@eleboucher on GitHub · 2026-11-30 05:47 UTC · original
With the device-removed report fixed (#3740) on top of this PR, the third hardware-path run here (removed again ~100 s in) logged:
DRED auto-breadcrumbs and page-fault tracking were on, yet the driver recorded no breadcrumbs and no page fault for any of the layer's command lists, and the layer's own submitting thread was between submissions. So the removal does not look like a fault inside a translated draw or dispatch. Work recorded or executed outside those lists, such as the BLAS/TLAS builds, refits and the instance-remap pass, would be my first suspects, but that is not shown. A next step could be to put those
list::externaloperations on their own list with markers, or to run withVICTORY_HW_RT_REFIT=0.@dyshay on GitHub · 2026-11-30 06:03 UTC · original
Thank you, this is exactly the kind of test it needed, and the DRED run narrows it a lot.
One difference with our runs stands out: you set
VICTORY_BVH_MISS=0. With the hardware path, the title's own builder is replaced, so the console-format structures are never written. Any traversal loop that doesn't lift to RayQuery falls back to the software walk, and withBVH_MISS=0that walk reads structure memory that was never filled. An unbounded loop over garbage nodes on the card would fit what you saw: no breadcrumb in any of our lists, the submitting thread idle, then a removal.victory playsetsVICTORY_BVH_MISS=1in every run (apps/victory/src/play.rs:116), so in our four runs (4090, 300 s each) the fallback rays miss instead of walking. We had no removal.Could you rerun once without
VICTORY_BVH_MISS=0(or with=1)? In the meantime I'll make the hardware path force the fallback to miss whateverBVH_MISSsays, since walking unwritten structures is never right. That goes in this PR. I'm also queuing a 20-minute hardware-path soak on our side, plus one withBVH_MISS=0to see if it reproduces here.If it still happens with
=1, the next suspects are the ones you named: the BLAS/TLAS builds, refits and the instance-remap pass outside our marked lists. I'll put those on their own list with markers so DRED can name them.@eleboucher on GitHub · 2026-11-30 06:42 UTC · original
Rerun as asked: same build (this PR + #3740),
VICTORY_HW_RT=1 VICTORY_BVH_MISS=1 VICTORY_ACTIVATE_RAYS=1 VICTORY_D3D12_DRED=1, warmed withVICTORY_HW_RT=1. It still lost the device, inside the first 120 s of play (0x887A0005).So
BVH_MISS=0is not needed for it: again no breadcrumbs, no page fault and nothing of the layer's lists running. That leaves the structure work outside the marked lists (builds, 2,637 refits, the remap pass), or the eviction of structures still in use (446 evicted by then).VICTORY_HW_RT_REFIT=0would be my next single switch to try. I can run it, or your marked-list build when it is up.@dyshay on GitHub · 2026-11-30 06:48 UTC · original
@eleboucher thanks again. Since your runs, the PR head (
53c6eab4) has five changes aimed at exactly that kind of removal, with no breadcrumb in our lists and the submitting thread idle:VICTORY_BVH_MISSsays. Unlifted loops no longer walk the console-format structures, which are never written in this mode. A warning is logged if=0was asked.VertexCountbecomes degenerate. Before, an IB the CPU couldn't read went to the build unchecked, and refits trusted a cache keyed by address. Skipped geometries now stay in place as inactive ones, soGeometryIndexdoesn't shift.If you have time, could you rerun the same settings on
53c6eab4, withVICTORY_D3D12_DRED=1(and #3740 on top if you can)? On our side, a 20-minute soak and one withBVH_MISS=0are running now on the 4090.@eleboucher on GitHub · 2026-11-30 06:52 UTC · original
Same again with
VICTORY_HW_RT_REFIT=0(andBVH_MISS=1, DRED on): device removed inside the first 120 s,device-removed data; breadcrumbs (done/count, list) []. So refits are not it either. That leaves the builds themselves, the remap pass or eviction of structures still in use, which your marked-list build should separate. I'll run it here when it is pushed.@dyshay on GitHub · 2026-11-30 06:53 UTC · original
Thanks, that narrows it nicely. The marked build is already pushed: the PR head is
53c6eab4(branchpr/hardware-rton dyshay/VIctory-NVIDIA). Besides the DRED markers on the BLAS/TLAS builds, refits and the remap dispatch, it has the lifetime fixes: per-operation scratch and instance ranges held until their list is reset, and every TLAS keeping its referenced BLAS alive. So it tests the eviction hypothesis and names the operation if it still goes.@akimfomin on GitHub · 2026-11-30 07:04 UTC · original
@dyshay @eleboucher Thanks for pinning the repro and the lifetime fixes, and for crediting our Lab #8. We have another RTX 4070 Ti SUPER 16 GB on Windows 11.
Our experimental branch keeps the console builder active and independently tracks the native BLAS/TLAS generations. A generated DXR 1.1 fixture on this GPU gets 45 exact answers with queue-ordered late TLAS binding, including material culling and deformation. Selecting the stale generation changes two answers in the negative control. Fixture and results
For full graphics with native 1440p, we are checking reuse of the RayQuery lowering while retaining the entire original traversal whenever a required scene is incomplete or stale. Do you know of a dependency in the lifted shader ABI that requires replacing the console builder, beyond instance metadata and the TLAS SRVs? The translator-only patch applies cleanly to our base. We are checking the exact scene bindings and can share a small regression test for the missing-scene dispatch case.
@dyshay on GitHub · 2026-11-30 07:29 UTC · original
Data point from our side: a 20-minute soak on the RTX 4090 (Series S, house, hardware path,
cc74ac5e= fallback-miss fix only, no lifetime fixes yet) ran without a device removal. It did show something to fix regardless: bottom levels are never budgeted. BLAS live grows steadily (3,763 → 9,277) and AS memory from 370 MB at ~3 min to 1,190 MB at ~17 min, ~190 MB every 3 minutes, with evictions not keeping up. That isn't what removes your device inside 120 s (you were at 472 MB), but on 16 GB cards it would add up over a session, so a BLAS budget with LRU eviction is next on our list.@akimfomin on GitHub · 2026-11-30 07:30 UTC · original
Thanks for the long-run data. For the BLAS budget, it would help to log bytes of the lookup entries separately from bytes still pinned by a TLAS or an executing list. An LRU removal can get the next lookup under budget while the memory remains in flight. A pressure test that crosses a build, a later consumer, and a fence could check that distinction.
We published the generated dispatch-selection test requested above.
Run.ps1 -Fallbackgot 45 exact answers on RTX 4070 Ti SUPER with native / fallback / native execution. Allowing an older scene on the middle dispatch changed exactly two hits. In our local full-graphics probe, the middle one of three required scene bindings was already pending when the hot dispatch was submitted. We keep the original dispatch until the scene’s validity can be checked in GPU order. Test and pinned source@dyshay on GitHub · 2026-11-30 07:39 UTC · original
@akimfomin thanks, the fixture and the generation tracking are very useful.
On the lifted ABI: as far as our port goes, nothing in the lifted shaders needs the console builder replaced. What they depend on:
InstanceID, mask, contribution, and the remap from console instance to host BLAS.GeometryIndexmatching the order of the title's geometry descriptors. That's why we now keep skipped geometries in place as inactive ones instead of dropping them.The HLE builder replacement is how we get 2–4 (the build calls carry the descriptors) and how we avoid paying the console builder's compute. Keeping the console builder running alongside, as you do, should work with the same lowering. It also keeps the software walk valid as a fallback, which our mode can't offer, hence our forced miss. Your "keep the original dispatch until the scene is valid in GPU order" is the safer design for incomplete scenes. A shared regression test for the missing-scene dispatch would be welcome.
On the budget: agreed, and thanks for the precise point. We'll count lookup-table bytes separately from bytes still pinned by a TLAS or a list in flight, and only count memory as freed once the last fence that can see it has passed, not when the LRU entry is dropped. The pressure test you describe (build → later consumer → fence, with eviction in between) is a good gate for it.
@akimfomin on GitHub · 2026-11-30 07:42 UTC · original · edited 2026-11-30 08:00 UTC
Thanks for confirming the interface. We built both compute PSOs on the 4070 Ti SUPER with the console builder still active. The first hot shader lifted all five loops and consumes three TLAS slots. The second shader remains byte-for-byte stock because its lift would need substitute triangle attributes. We also confirmed the game builds all three TLAS inputs through the contiguous descriptor path. Our first sampling policy gave only one a chance to publish, so the next run gives each its own slot.
The generated fallback check is ready for independent use. I’ll extend the shared regression to cover a missing required TLAS among several bindings and preserve GeometryIndex, primitive and barycentric answers when the test switches paths. A source-level review of that case would be welcome. Current check and exact revision
Update: the three-scene generated regression is pinned here. The GPU falls back when just one required scene is missing. GeometryIndex 1 / PrimitiveIndex 1 and barycentrics agree across the two paths; 45/45 hits on RTX 4070 Ti SUPER.
@eleboucher on GitHub · 2026-11-30 08:11 UTC · original
Rerun on
53c6eab4with #3740 on top,VICTORY_HW_RT=1 VICTORY_BVH_MISS=1 VICTORY_D3D12_DRED=1, same RTX 4070 Ti SUPER: still removed (0x887A0005), inside the first 120 s.breadcrumbs (done/count, list) []again. Your new markers on the BLAS/TLAS builds, refits and remap did not show up either. So either nothing marked was in flight, or the driver recorded no breadcrumbs at all for this removal (our own lists were empty too).dispatch 160x90x1 [compute 2f03a2df10503cef](u4=0xa04900, u5=0x153fdc0, first SRVs0+176a 2044-element buffer at 0x46564100).If
2f03a2df10503cefis one of the lifted programs, it could be aRayQueryagainst a TLAS (or one of its BLAS) that is not valid at that moment. The ray-tracing programs in our timing runs on this frame are f22a76fc/6d7fe774 plus several smaller ones; 2f03a2df appears there at ~0.14 ms per frame with the software walk. Does your lift report name it?@akimfomin on GitHub · 2026-11-30 08:18 UTC · original
I checked
2f03a2df10503cefdirectly on the second 4070 Ti SUPER setup. The 7,096-byte local container contains one compute program. Its instruction stream decodes successfully and has zeroimage_bvh*operations. Stock translation and the translation with the #3706-derived RayQuery pass enabled produce byte-for-byte identical DXIL for this hash. The same shader binds normally on our local full-graphics run with the stock builder and private DXR scene preparation.That rules out an inline ray query in that dispatch on this program. DRED and the last submitted name still leave earlier GPU work open. A useful one-variable isolation would be the HLE builder and its remap/bounds checks with lifted dispatches disabled, using a reproducible consumer test that needs no title hits. If that still removes the device, it narrows the search to scene preparation, lifetimes or queue state. The crash excerpt has enough for the current check; no private cache or dump needed.
@dyshay on GitHub · 2026-11-30 08:39 UTC · original
@eleboucher thank you for running the new head. @akimfomin thanks for checking
2f03a2df: noimage_bvh*in it, and identical DXIL with and without the pass, so that dispatch itself can't be a RayQuery.That leaves the scene preparation (HLE builder, BLAS/TLAS builds, the remap compute, the new index/vertex copies) or something earlier in the queue. I'm adding the isolation akimfomin suggests, as a diagnostic switch:
VICTORY_HW_RT_LIFT=0keeps the HLE builder and all scene preparation running but lifts no loop, so every ray takes the (forced-miss) fallback. If the device still goes with it, the lifted shaders are out and the search is the preparation. If not, it's a lifted dispatch reading a structure that isn't valid yet, and akimfomin's GPU-order validity check is the fix. I'll post the head here when it's pushed.@eleboucher two quick facts would help: your driver version, and whether the removal still happens with ray tracing on but at a lower output size (e.g. Series S profile). The 4090 here has run 2 × 20 min plus 6 shorter runs on the same code without a removal, so something about the card, driver or memory size matters.
@eleboucher on GitHub · 2026-11-30 08:43 UTC · original
--res 1440 --dlss off), Series X profile. Typical use during play: ~12.5-14 GB of the card plus ~3.5 GB shared, so memory is tighter here than on a 24 GB 4090.53c6eab4+ #3740, same switches (VICTORY_HW_RT=1 VICTORY_BVH_MISS=1 VICTORY_D3D12_DRED=1) with--series-s. It runs next on the PC; I'll post the result here, thenVICTORY_HW_RT_LIFT=0once that head is up.@ColorC on GitHub · 2026-11-30 08:58 UTC · original
Sharing a 4-minute (235s) open-world walking stability report on Blackwell (RTX 5070 Ti 16 GB) + Ryzen 7 9800X3D + 32 GB RAM (Series X 1440p, DLSS Quality + 3x MFG,
VICTORY_HW_RT=1,0errors / NO0x887A0005Device Removed), plus a diagnostic clue on multi-second BLAS build bursts:VICTORY_HW_RT=0)VICTORY_HW_RT=1)0x887A0005N=48) / 0 crashes / 0 errorsN=47) / 0 crashes / 0 errors34.0 / 24.4 ms)44.0 / 36.6 ms)<= 100 ms)30.1 FPS(33.9 ms), Max43.0 ms23.8 FPS(42.6 ms), Med40.8 ms, P9050.0 ms, Max58.8 msRayQuery & Acceleration Structure Telemetry (
t=235s)Diagnostic Clue Regarding
0x887A0005on Other Systems0errors, 6 of the 47 windows saw large pauses when walking into newly streamed ~11.8k–12.2k-draw areas:t=35s (456 ms),t=40s (3,104 ms),t=50s (1,260 ms),t=55s (3,705 ms),t=70s (1,318 ms),t=215s (1,431 ms)— matching theBLAS prep 11352 mscumulative total (14,763builds /2,319rehydrates).0x887A0005) during heavy streaming bursts.Test Setup
--res 1440 --dlss quality --framegen 3 --fps 1000)-C target-cpu=znver5) rebased onmain(41adb551) with a curated local PR stack; all A/B numbers below are same-binary toggle ablations from the exact same restored save (~10.0k–10.4k draws/frame standing scene) after official 1-time warmup.@dyshay on GitHub · 2026-11-30 09:03 UTC · original
@ColorC thank you, this is a very useful data point: a 16 GB Blackwell card with no removal over 4 minutes, so memory size alone isn't it. The streaming bursts you found are the best lead so far. 3.7 s pauses while BLAS prep runs fit exactly how a slower card or driver could cross the 2 s TDR: one submission carrying thousands of BLAS builds and rehydrates at once.
We'll cap the scene preparation per frame: a budget on BLAS builds and rehydrates (bytes and count) per submission. The rest is deferred to later frames, and instances whose BLAS isn't ready yet get mask 0 for those frames (a short-lived miss rather than a stall). Each build batch also goes on its own marked list, so a removal, if any is left, names it. It goes into this PR, and I'll post the head here. @eleboucher this is the variant I'd most like you to try once it's up.
@dyshay on GitHub · 2026-11-30 09:03 UTC · original
The isolation switch is pushed: PR head
7bbd5e56.VICTORY_HW_RT_LIFT=0keeps the HLE builder and all scene preparation (BLAS/TLAS builds, refits, remap, the index/vertex copies) but lifts no loop, so every ray takes the forced-miss fallback. @eleboucher if the device still goes withLIFT=0, the cause is in scene preparation (most likely the build bursts ColorC measured), and the per-frame BLAS budget I'm adding next is the fix to try. If it doesn't go, it's on the lifted dispatches.@eleboucher on GitHub · 2026-11-30 09:05 UTC · original
Building
7bbd5e56(+#3740) now;VICTORY_HW_RT_LIFT=0runs right after the Series S run here, then the per-frame BLAS budget when it is up. Same card, driver 621.24, native 1440p, DRED on. Results to follow in this thread.@akimfomin on GitHub · 2026-11-30 09:09 UTC · original
@dyshay Thanks for adding the isolation switch. The stock-builder path now runs two lifted loops of one mixed compute pass in the game on our 4070 Ti SUPER. The other three loops retain the stock walk. The GPU selected both the hardware path and the original fallback in ordinary asynchronous submissions. The trial reached the house and exited normally. Its coverage is still one small scene, with the same-frame output comparison pending. Reproducible gate and separate hit checks
@ColorC Thanks for the 5070 Ti walk. Correlating the six bad windows with per-window build/refit deltas and GPU queue intervals would separate BLAS demand from unrelated streaming waits. The cumulative CPU preparation total alone leaves that open. If those interval counters are already in your local trace, the aggregate deltas and whether a fence wait spans each pause would help.
@eleboucher on GitHub · 2026-11-30 09:11 UTC · original
Series S (
--series-s, 1280x720 inside) on53c6eab4+ #3740,VICTORY_HW_RT=1 VICTORY_BVH_MISS=1 VICTORY_D3D12_DRED=1: removed too (0x887A0005), between 120 and 240 s of play. At t=120 s: 9.9 fps, 3,763 draws/frame, card 6.1 GB + 1.3 GB shared, so far from any memory limit. DRED breadcrumbs empty again. So it is not output size or memory on this card.7bbd5e56withVICTORY_HW_RT_LIFT=0runs next.@eleboucher on GitHub · 2026-11-30 09:18 UTC · original
7bbd5e56+ #3740 withVICTORY_HW_RT_LIFT=0(VICTORY_HW_RT=1 VICTORY_BVH_MISS=1 VICTORY_D3D12_DRED=1, Series X, native 1440p): still lost, inside 120 s. This time it was a hang,0x887A0006(DEVICE_HUNG), and DRED did record breadcrumbs:"victory host list 17"at 15/46 and another at 0/6 (queued behind it).dispatch 10x1x1 [compute 89d08e561897d4e5]dispatch 20x1x1 [compute 55679a0547649d0b]s0+688= the 182,452,224-byte buffer at 0x28960000 (also bound as UAVs0+1480on0x1b1b05d5590), SRVs0+200608,000 elements, SRVs0+712960,000, UAVss1+8/16/24, and UAVs1+32= a 6,416-byte range at offset 58,927,424,544 of0x1b1a38a7650.So with no loop lifted it still hangs, and the hang is in a 10- or 20-group title dispatch: a few groups looping forever, not a big workload. Since the title builder is replaced on the hardware path, my first guess would be one of the title's programs that reads something the builder used to write (sizes, counts, node pointers) and now finds unwritten. Only a guess. Do 89d08e56 / 55679a05 appear in your lift report or in the builder's consumers? Aftermath dumps are now on here as well; the next run (
LIFT=0, no DRED) should give a crash dump with the faulting shader if the driver records one.@dyshay on GitHub · 2026-11-30 09:22 UTC · original
The per-frame budget is pushed: PR head
a950fae3. At most 256 BLAS builds + rehydrates and 64 MB of build input per frame, plus 2,048 refits; the rest waits in FIFO order of first request. At least one build always goes, so nothing starves, and the CPU decode is deferred with its build. Instances whose BLAS isn't ready get mask 0 (a brief miss, never an old or freed structure). The per-frame BLAS work is chunked (64 builds / 16 MB) with one DRED marker per chunk, and a new 5 s linehardware RT budgetcounts deferrals, backlog and masked instances. A ~17k-build burst like ColorC's drains in about a second of backlog instead of one multi-second submission. @elebouchera950fae3is the head to try (it keepsVICTORY_HW_RT_LIFT=0available too).@eleboucher on GitHub · 2026-11-30 09:24 UTC · original
Building
a950fae3(+#3740) now; next on the PC are two runs, default lift andVICTORY_HW_RT_LIFT=0, DRED on (for the chunk markers), with the Aftermath monitor collecting crash dumps. Results here when done.@akimfomin on GitHub · 2026-11-30 09:24 UTC · original
@eleboucher Both compute programs appear in our local cache.
89d08e561897d4e5and55679a0547649d0beach decode to one compute program with zeroimage_bvhinstructions. Both produce byte-identical DXIL with our RayQuery translator enabled and disabled. Neither is a lift candidate here. That leaves what they read and write open.@dyshay With
LIFT=0still hanging, can we compare the producer order, allocation generation and initialized range of the shared buffer under the stock and replacement builders just before these two dispatches? A diagnostic that records only range sizes and readiness codes would be enough for a first comparison. The new cap helps isolate scheduling pressure separately. Our experiment keeps the original dispatch whenever the needed mask lacks confirmed coverage.@eleboucher on GitHub · 2026-11-30 09:32 UTC · original
Aftermath crash dumps (driver 621.24, Global mode via
nv-aftermath-control, no SDK in the layer) name the fault, which DRED never did. On7bbd5e56LIFT=0anda950fae3with default lift andLIFT=0(three runs, all lost inside 120 s, all0x887A0006), the dumps agree:Same shader, same instruction, with and without lifting, so it is not the RayQuery code. It is a compute program that does an unaligned load or store, most likely a raw-buffer or structured access whose address now comes out misaligned on the hardware path (an offset, stride or base the replaced builder or the remap writes differently: e.g. a 4-byte
Loadat an address that is only 2-byte aligned, or aLoad4not on 16 bytes). The layer's in-flight report for these runs pointed at title computefdd56d97a806bcca(a950fae3) and89d08e561897d4e5/55679a0547649d0b(7bbd5e56), which all bind the 182 MB buffer ats0+688.Next here: a run with
VICTORY_SHADER_SAVEsonv-aftermath-format -Bcan map0x145B3497B18876A7to the title's shader hash and DXIL line. Happy to share the.nv-gpudmpfiles if useful.@dyshay on GitHub · 2026-11-30 09:39 UTC · original
@eleboucher this is the breakthrough, thank you, and the Aftermath route was the right call. "Misaligned Address Error" in the same compute shader with and without lifting moves the fault from RayQuery to where the title's buffers sit.
One thing that stands out:
55679a0547649d0bisCS_Tree_BatchCull's second dispatch. It's the one SlaktarnVI found reading a structured view that isn't 16-byte aligned (a raw twin made null), and we found ~6,000 such views a frame on NVIDIA. That suggests a concrete mechanism for "only on the hardware path". Our HLE builder answers the title's prebuild-size queries itself, and the title then packs the BVH buffers into its graphics heap (the 182 MB buffer ats0+688) by those sizes. If our answers aren't rounded the way the console library's are (256-byte AS alignment, or the scratch/result size granularity), every buffer the title places after them shifts. Raw and structured views into that heap would then land on offsets the shaders assume are aligned, and on your driver a misaligned raw access faults. The 4090 here may tolerate it, or our heap layout may differ.I'm checking our size answers against the alignment rules now, and will push a fix that rounds them as the console does if they don't. In the meantime, the
VICTORY_SHADER_SAVEmapping of0x145B3497B18876A7to a title hash and DXIL line would confirm which load it is (likely aRawBufferLoad/Load4throughs0+688). If you can, also post theu4/u5and the SRV offsets for the failing dispatch under both builders.@akimfomin on GitHub · 2026-11-30 09:41 UTC · original
@eleboucher I checked the additional
fdd56d97a806bccafrom thea950fae3report too. It has one decoded compute program, no BVH instructions, and identical DXIL with and without our lift, like the other two. The Aftermath mapping would tell us whether any of these three is the shader that actually faulted. The mapped title hash, operation width, and offset modulo alignment are enough to share here. Please keep the raw dump local.@dyshay I’ll check the stock builder’s size and alignment distributions on our path, so a comparison can distinguish a layout change from a misaligned access already present in stock. Keeping the engine’s requested size, returned result and scratch sizes, and allocation alignment as separate fields should make that useful.
@dyshay on GitHub · 2026-11-30 09:55 UTC · original
Pushed as
22a6600b: one real difference, plus two diagnostics so we can see if it's the cause.The difference. After a build, the hardware path wrote the driver's raw compacted and current sizes into the title's post-build slots. D3D12 doesn't promise those are multiples of 256, and the title sizes and places its compacted copies with them. The software path (the real library +
VICTORY_BVH_SIZE_ANSWER) always writes 256-aligned sizes. Now the hardware path writes the size it announced at prebuild (≥ 256 and a multiple of 256). Prebuild answers were already multiples of 256, so nothing shifted from those.Diagnostics (diagnostics builds):
BVH size answer: one line per distinct (builder, kind of answer, input shape, sizes), with size % 256, under both builders and with the same shape key, so a run on each can be compared line by line.a buffer view off 16 bytes: one line per distinct case of a buffer SRV/UAV whose start isn't 16-aligned (view kind, start % 16, element size, inside the 0x28960000 heap or not), plus counters by remainder. All our raw loads declare 4-byte alignment, so a fault would need a view starting at an address that is 1–3 mod 4. This line will show whether that happens.@eleboucher if you run
22a6600b, the most useful output would be the device result plus those two log families (a diagnostics build), compared with the same save on the software builder.@akimfomin on GitHub · 2026-11-30 09:56 UTC · original
@dyshay The stock-builder audit reached the house and exited normally on 4070 Ti SUPER, Series X, internal 2560×1440, no DLSS or FG. Here are the independent counts from its prebuild returns and recorded allocations.
All observed destination and scratch addresses were divisible by 256 in the 24,576 batched BLAS and 2,048 batched TLAS descriptors. All nonzero update source addresses were too. This separates the title’s stock allocation alignment from the divisibility of the returned scratch byte counts. It is consistent with treating the post-build result size contract and the actual scratch pointer alignment separately. The device-loss outcome on
22a6600bis still the discriminating check.@eleboucher on GitHub · 2026-11-30 09:57 UTC · original
Narrowed to one program. The layer's in-flight report at every hardware-path removal (
7bbd5e56LIFT=0,a950fae3lift and LIFT=0) names title compute89d08e561897d4e5(dispatch 10x1x1, ~15-17 commands into a 46-command list). WithVICTORY_SHADER_SAVEanddxc -dumpbin, its DXIL near the Aftermath PC (dxil:8519) is a chain of raw loads whose byte offsets come from buffer contents, never masked to 4:So
%41is an offset the title stores in one buffer, and%71an offset stored at%41 + 4in another. If either holds a value that is not a multiple of 4, every one of these 4-byte loads is misaligned: NVIDIA silently ignores the low bits normally, and Aftermath's shader error reporting turns it into the fault we see. On currentmainwith the software builder, the same program faults the same way under Aftermath's shader error reporting, and it runs clean without it. So the latent misalignment exists there too. On the hardware path, if the builder's outputs that this program reads (headers or offsets at%41,%71) are no longer written by the title's builder, the offsets are whatever the memory holds, which would fit the real removals. That is a hypothesis.Question for you: does
89d08e561897d4e5read the console structures or instance data thatXboxBvhBuilderused to write (offset 60/64 headers, a table at +376)? If yes, the HLE builder needs to write those fields too (or the program must be fed the host-side equivalent). The full disassembly is available if useful.@akimfomin on GitHub · 2026-11-30 10:08 UTC · original
@eleboucher The stock run with shader error reporting is an important control. It shows that the reported instruction alone cannot explain the device losses seen with the reporting option off. I can inspect the same pass using our stock builder and compare its bound buffer ranges with the preceding builder output ranges. A shared backing heap alone does not identify the writer. I’ll look for a producer or copy that covers the specific view before the dispatch. No need to post the disassembly. The
22a6600btest with error reporting off is the separate check for the original device loss.@eleboucher on GitHub · 2026-11-30 10:24 UTC · original
Thanks both.
22a6600b(+#3740) is built and queued here with error reporting off (Aftermath disabled, DRED on), default lift, 10 min; result in this thread.On the misaligned access itself, the AMD RDNA2 ISA reference settles what the console does. Section 7 (scalar memory): "The two LSBs of V#.base and of the final address are ignored to force Dword alignment." Section 8.1.7 says the same for non-formatted dword-or-wider buffer ops in the default DWORD alignment mode.
89d08e561897d4e5loads byte offsets withs_buffer_loadand reuses them as SGPR offsets of laters_buffer_loads. Our DXIL passed those offsets torawBufferLoadwithout clearing bits 0-1. On the console that is well defined (rounded down). In D3D12 it is a misaligned access, tolerated silently by NVIDIA and fatal under Aftermath's shader error reporting. So the instruction Aftermath reports is a translator bug in main, independent of #3706. I have a translator fix under test here: the final SMEM address (and dword+ MUBUF addresses) is masked with& ~3, with a unit test. I'll open it as its own PR once the PC runs confirm it, and say whether it changes the hardware-path removals.@akimfomin on GitHub · 2026-11-30 10:27 UTC · original
@eleboucher I ran the stock producer/consumer control on RTX 4070 Ti SUPER (617.14), native 1440p Series X with full RT. The specific compute pass had 115 resolved raw-view observations across 11 sampled dispatches. Zero view ranges intersected the tracked preceding stock builder destinations (batched/rehydrate reported ranges or a 64-byte typed-copy prefix, up to 8,192 preceding records). The stock scene loaded at the house and exited normally. This is a bounded negative result. It leaves untracked writers, copies to another range, and data-dependent byte offsets open. Thanks for finding the RDNA2 rule. Once you have the translator PR, I can cross-check a generated case with a dynamic offset plus immediate add crossing a dword boundary, and share only the generated fixture and summary.
@dyshay on GitHub · 2026-11-30 10:39 UTC · original
@eleboucher excellent find, and the ISA citation settles it: the console drops the two low bits, and our DXIL kept them. That's a translator correctness fix for
main, independent of this PR, so I'll leave it to your PR rather than duplicate it, and test it on the 4090 as soon as it's up (we have a static save for exactly that). If the removals on the hardware path go away with it, the explanation would be that on this path different, not-dword-aligned offsets reach those loads more often, and NVIDIA's tolerance doesn't hold on your card/driver outside Aftermath.@akimfomin thanks for the stock-builder control and the alignment counts. Every observed address divisible by 256, while the scratch byte counts often aren't, matches the change in
22a6600b(announce 256-multiple sizes, separate from pointer alignment).@eleboucher on GitHub · 2026-11-30 11:02 UTC · original
22a6600b(+#3740), error reporting off (Aftermath disabled),VICTORY_HW_RT=1 VICTORY_BVH_MISS=1, DRED on, native 1440p Series X: 13.3 fps at t=120 s with the hardware path, then device removed (0x887A0005) before t=240 s. DRED breadcrumbs empty again. The layer's in-flight report: 1 submission of 8 lists, stopped in list 1 at a texture copy (copy to ... 64x150 f29). So the size answers alone do not stop it here. For comparison: plainmain41adb551with the software builder also loses the device on this PC with ray tracing on (11 of 11 runs today, 120-240 s), so part of what we see may be amainissue rather than this PR. Translator fix for the misaligned SMEM access is up as #3894; it removes the Aftermath-reported fault but not these removals.@akimfomin on GitHub · 2026-11-30 11:04 UTC · original
@eleboucher Thanks for keeping the same native profile and checking both builders. The 13.3 fps point before removal is useful, and the 11/11 stock failures distinguish this from a hardware-builder-only result. On our 4070 Ti SUPER with 617.14, the pinned stock control reaches the same kind of open-world scene and exits normally after our short diagnostic windows. Those runs are shorter than your 120–240 s failure window. I’ll check a longer control separately and test #3894 against a generated SGPR+immediate carry case. If you have an aggregate for local VRAM use vs budget and queued flights just before the stock loss, that would help compare the texture-copy path. No dump or private log needed.
@eleboucher on GitHub · 2026-11-30 11:09 UTC · original
Aggregates from today's stock
mainlosses here (41adb551+ #3740, software builder, ray tracing on, no Aftermath), taken from the last samples before each removal:the card's own 14064 MB in use of a budget of 15066 MBat the last sample of one run), plus 3.6-4.3 GB of PC memory shared with the card.1 submissions sent ahead (VICTORY_RELAY=1)of 1-8 lists, all 0x887A0005. One run was 0x887A0006 (hung) with 20 submissions / 245 lists ahead.To find what changed, I'm bisecting
main's first-parent merges since the goal1/main merge-base7fcac7f1(that older base ran 19/19 clean today), 2 x 5-min legs per step. I'll post the first bad merge here.@akimfomin on GitHub · 2026-11-30 11:28 UTC · original
@eleboucher I completed the longer stock control. The Lab baseline e660311e on RTX 4070 Ti SUPER (617.14), 32 GB RAM, native 2560×1440 Series X, full stock RT, DLSS/FG off, stayed in the open-world house scene for 254 seconds after visual confirmation and exited normally. The camera alternated between idle and AFK views. No device removal or hang was logged. In 156 samples, dedicated GPU memory was 12,331–12,807 MB with a 14,655–14,906 MB budget, shared GPU memory 6,861–7,240 MB, and system commit 31,642–33,186 MB. This control has a different revision, driver and RAM capacity from your stock reproduction. Your bisect is the useful evidence for the first bad change. The source-only scalar fixture is tracked separately in #3894.
@dyshay on GitHub · 2026-11-30 11:46 UTC · original
PR head
121d0dc8adds the BLAS memory budget with LRU eviction, as discussed. Here is how it stays fence-safe. The remap shader stamps every BLAS entry a TLAS build actually resolves. Those stamps are read back after the list's last execution, so eviction only judges up to the oldest TLAS whose stamps are back, and a BLAS a TLAS in flight can name is never evicted. Each BLAS's bytes are shared between the lookup table and the TLAS snapshots holding it. Its memory counts as freed only when the last holder is released after its fence. An evicted BLAS stays in the table at address 0 (its instances are masked) and is rebuilt from the title's last request when an instance names it again, through the per-frame build budget. Defaults: budget 10 % of the DXGI local budget (256 MB to 1.5 GB), trim to 90 %, unused for 120 frames before eviction, at most 512 evictions a frame. A 5 s linehardware RT BLAS memoryshows budget / live / pinned / evicted / renamed / rebuilt / freed after fence. @voidharbor this is the head to check the memory growth against. Our 20-minute run is queued.@akimfomin on GitHub · 2026-11-30 11:55 UTC · original
@dyshay Thanks for the exact LRU head. I checked the pass that writes a zero BLAS address for waiting or evicted entries. Our quality target keeps the original traversal whenever a pass’s needed instance masks are incomplete, so I’m interested in the interval after a required evicted BLAS is named again and before the rebuilt one is visible to the TLAS. Does your queued run expose remap resolutions for waiting/evicted instances and the number of frames until the same addresses recover? The existing pinned/live/freed counters cover memory ownership. The additional counts would tell us how many rendered frames actually have a temporary coverage gap. I can test the before-and-after cases in a generated scene independently from the game.
@dyshay on GitHub · 2026-11-30 12:40 UTC · original
@akimfomin good question. The 5 s line already counts BLAS named again after eviction (
renamed) and those rebuilt (rebuilt after eviction), but not the gap itself. I'll add two numbers to it: TLAS instances resolved to a zero address because their BLAS was evicted (separate from those still waiting for their first build), and the frames from a BLAS being named again to its rebuilt address being visible. With 120 unused frames before eviction and rebuilds going through the per-frame budget, I expect the gap to be 1-3 frames and rare on a static scene; the walking run will tell. I'll post both from our run.@akimfomin on GitHub · 2026-11-30 12:59 UTC · original
@dyshay Thanks. Splitting first-build waits from eviction-driven misses gives us exactly the comparison we need. If the walk catches those gaps, could you also report how many sampled frames had at least one missing instance of either type? The instance count can be dominated by many references to one BLAS. Our generated three-TLAS check now binds three actual TLAS resources and confirms that a missing proof selects fallback. We can use the walking aggregates to choose the next queue-lifetime case without relying on raw game logs.
@voidharbor on GitHub · 2026-11-30 13:27 UTC · original
Numbers from a 16 GB card, and two memory changes that held the structures flat here. They are on
53c6eab4, so before your budget commits (a950fae3,22a6600b,121d0dc8), which I have not run yet.Setup. Ryzen 7 9800X3D, RTX 5070 Ti 16 GB, 64 GB DDR5-4800, Windows 11. Series X profile at 2560x1440, DLSS Balanced, DLSS frame generation 2x, no frame cap. Tree: main
41adb551with a number of open pull requests merged locally, this one among them. Caches fully preloaded for each switch set. Every run starts from the same save and is driven by a script through the keys file: 180 s of walking and camera turns in the open world. Frame rates are by draw count, from the seconds the route spends in each range.Hardware against the software builder (an earlier head of this pull request, from the 29th; medians):
VICTORY_HW_RT=1(7 runs)So about 18 ms off the card and 10 ms off the submitting thread here, and the multi-second card spikes of the software builder are gone.
Memory, before any budget. From the
memory nowlines over the last 200 s of 240 s runs: the software builder grows 0.33 to 0.36 GB per 3 minutes, hardware 1.1 to 1.5 GB, and the card passes its budget inside four minutes (15.0 to 15.6 GB in use against about 14.9). The structure counters show 16,000 to 18,000 builds against 380 to 460 frees in 240 s. One of 22 hardware runs without the changes below lost the device, 164 s into the route (relay: the device was lost before fence value ... was reached).Two changes that bound it without letting go of anything in use. Patches on
53c6eab4: https://gist.github.com/voidharbor/c00d271d10e75593ad0887050ab427cdVICTORY_HW_RT_RELEASE=1: a host BLAS is let go when the title builds another structure over its memory (any overlap of the title's range), not only at the same address with another shape.VICTORY_HW_RT_COMPACT=1: the title's compaction is done on the card too (the post-build size read back, a compacted copy made, the original freed a second later).Same route, 240 s, last 200 s:
Longer runs with both on:
In the 10 minute run the card stayed at 13.9 to 14.3 GB throughout. In the 31 minute run it went over budget from about minute 16 (15.3 to 15.8 GB at the end), but that was texture copies growing from 3.3 to 5.65 GB while the structures stayed under 0.5 GB, so it is a separate matter from this pull request. Eight runs with both switches on so far, none lost the device.
What this does not show. The only picture check is the missed counter and a recording; I have not compared frames against the software builder. One card, one route. The patches will need a rebase past
22a6600b(I expect conflicts inemit_postbuildandexecute_blas_batch), and I do not know yet how they sit with the budget and the eviction in121d0dc8: they should lower what a budget has to evict, since what they let go is already replaced by the title. I can rebase and run both together on this card if that is useful.@eleboucher on GitHub · 2026-11-30 13:28 UTC · original
Retest of
121d0dc8on a rebooted PC with Aftermath disabled (RTX 4070 Ti SUPER, driver 621.24, 1440p,VICTORY_HW_RT=1):host GPU failure: could not snapshot 12288 dirty bytes from a private CPU mirror; device removed (0x887A0005).Important for reading this: on the same boot, current main
41adb551without this PR (software walk) also lost the device 3 out of 3 (at 574 s, before 240 s, before 120 s), while an older base ran 2 out of 2 ten-minute legs clean right after. So this loss probably comes from main, not from the hardware path. I am bisecting main now and will post the merge that introduces it. My earlier losses on 5046243b..22a6600b likely share that cause.@nick0451 on GitHub · 2026-11-30 13:28 UTC · original
An Ampere data point. RTX 3090 24 GB (driver 610.88), i9-14900K, 32 GB, Windows 11. Series S, DLSS performance, frame generation off.
Build: v2026.11.29.05 (
41adb551) with this PR ata950fae3, plus #3740 so a removal would reach the log. Release build,VICTORY_D3D12_DRED=1.Comparison: hardware =
VICTORY_HW_RT=1 VICTORY_BVH_BUILDER=0; software =VICTORY_BVH_BUILDER=1, same exe. Fresh starts from frozen saves, alternating. A tap every 25 s keeps the idle camera off, so the shots are one view. Window off screen. Shots and fps 180 s into the world.Stability
No hang or removal at all: 13 hardware starts of 3–4 min (balcony and city), plus one 20-minute city run. No
887A000xand no device-lost lines.Speed (mean fps over the last minute of each start)
All 14 RT programs were lifted whole, with no fallbacks (
ray queries: lifted shaders 14, partly 0, fell back 0).Picture
VICTORY_HW_RT_REFIT=0(2 starts, 18.0 and 20.0 fps): the character comes out clearly lighter, in one start back to a normal white shirt and skin, and the ladder is lighter. The walls and door stay as dark. So the dark character looks tied to refitting the dynamic (skinned) BLAS. The walls look like a separate cause.VICTORY_HW_RT_LIFT=0doesn't help narrow it down here. All 14 programs fall back to the software walk, which withXboxBvhBuilderreplaced has nothing to hit. The picture and fps (25.5) are those of RT off.Memory: grows without levelling off (20-minute city run)
That is about 0.45 GB a minute on each side, still rising at the end. The software path levels off around 26 GB private in the same scene. BLAS appear to be kept for traffic and pedestrians after they leave. AS memory explains only about 1 GB of the card's growth, so something else (inputs, decodes:
quant24 VB / meshlet IB decoded 548 MB) is kept too.🤖 Generated with Claude Code
@akimfomin on GitHub · 2026-11-30 13:30 UTC · original
@voidharbor Yes, a rebase onto
121d0dc8would help. If feasible, run the same 10-minute walking replay with the budget alone, release alone added, and release plus compaction added. Live structure bytes, retired-but-fence-pinned bytes, and frames with any missing instances would separate the effects. I checked the patch: the one-second timer drops the source lookup, while remaining holders govern resource lifetime. A source lookup after that timer but before a delayed list submits is worth checking explicitly. Our generated three-scene test can cover the retired-source case independently of the title.@nick0451 The lighting difference despite all 14 programs lifting is an important result. If you repeat the identical balcony pose, can you compare stock, hardware refit, and hardware rebuild with just aggregate differences for the character and one fixed wall area? That gives us a direct way to separate the deformation issue from the wall shading issue without posting images or dumps.
@dyshay on GitHub · 2026-11-30 13:39 UTC · original
@nick0451 thanks, the darker picture with
HW_RT_REFIT=0lightening the character is a strong lead: it points at our refit of skinned BLAS (stale vertex positions or a wrong update). We're on it, along with the walls, which look like a separate cause (instance flags or winding). Which head did you run:121d0dc8(with the BLAS budget) or earlier? 894 evictions in 20 minutes suggests the budget was on. @voidharbor release on overlap and card-side compaction are the right ideas; we'll add both on top of the budget (credited to you) and post the 20-minute numbers.@spk-c on GitHub · 2026-11-30 13:43 UTC · original
RTX 4090 / Windows 10 independent data point on
121d0dc8.Ryzen 9 9950X3D, 64 GB RAM, driver 621.40, Series S, DLSS Quality,
VICTORY_HW_RT=1, software builder off, early reservation 0. I tested a local combination with the depth-state fix from #3572,VICTORY_NARROW_BARRIERS=place, and sampled indirect-draw diagnostics. This is not a clean-head A/B: the HWRT revision and the local fixes changed together.The 30-minute run had median 15.2 FPS, p99 frame time 119.8 ms (26,845 samples), mean GPU busy 52.3%, VRAM peak 17,900 MiB, private memory peak 36.5 GiB. Route input covered the first ~590 s, then remained stationary. Native DXR initialization and BLAS/TLAS activity were confirmed. In the debug run, zero depth-read and copy-source ID 538 messages, but 137 root-SRV messages remain, including a title buffer promoted to COPY_DEST when read by SetComputeRootShaderResourceView. No useful DRED breadcrumbs. Earlier runs on
22a6600bwith FG off and FG on both named the same indirect graphics pipeline in the in-flight report; that is not proof of the faulting shader.The long run is promising, not proof of an RT fix. FG remains unstable; independent PresentMon capture failed, so no display-FPS claim. Next I am isolating the Streamline present/HUD-less path and submission timing, and checking CPU preparation/copy-back costs. No raw game logs/assets attached.
AI disclosure: benchmark orchestration and this report were assisted by AI on the hardware owner's behalf.
@akimfomin on GitHub · 2026-11-30 13:45 UTC · original
@spk-c Thanks for separating the 30-minute FG-off result and the debug and FG failures. For the remaining
COPY_DEST-to-root-SRV warning, one short matched check would help: keep FG off, #3572 and the barrier flags fixed, and compare the stock builder with121d0dc8at the same route point. If the warning appears in both, we can track it separately from the hardware builder. If it only appears with HWRT, the preceding writer category (original copy, geometry decode, or instance remap) and command-list type would be enough to narrow it down. Counts and operation names are sufficient.@akimfomin on GitHub · 2026-11-30 14:41 UTC · original
For follow-up after the merge, the VIctory-NVIDIA Lab handoff includes the replayable diagnostic sources for our independent prototype. In its late large-scene samples, 56–63 of 107–112 distinct missing bindings already had a skipped direct build at submission. Exact-address prioritization still left 126 misses and was set aside. The generated three-TLAS test matched 135 expected results and caught both stale generations and swapped scene inputs. Same-frame hit, material and output parity in the game remains open. These counts are from the Lab prototype, not from the merged implementation.
@nick0451 on GitHub · 2026-11-30 15:25 UTC · original
@dyshay Those runs were on
a950fae3, so before the BLAS budget, plus #3740 on v2026.11.29.05. The 894 evictions came from that build's own eviction, with no budget.The same 20-minute city run on the merged release (v2026.11.30.01,
c71899d9, so with121d0dc8's budget) is queued right now, along with 3 + 3 balcony starts for the darkening. I'll post the numbers here when they're in, in about an hour.🤖 Generated with Claude Code
@eleboucher on GitHub · 2026-11-30 17:19 UTC · original
Correction to my 13:28Z retest: that
121d0dc8run was on a Windows boot that had already lost the device three times. On this PC (RTX 4070 Ti SUPER, 16 GB RAM, driver 621.24) a device loss makes later runs on the same boot lose sooner, whatever the build: the older base that runs clean on a fresh boot lost 2 of 3 legs after several losses, then 3 of 3 clean after a reboot. So that retest says little about this PR.Clean data since then (first run of a fresh boot each, 1440p, Aftermath off):
c71899d9(this PR merged),VICTORY_HW_RT=1: device removed before 240 s.c71899d9, software builder: device removed before 240 s and at about 5 min.7fcac7f1+ 48 commits): 5 of 5 ten-minute legs clean.So on this PC the loss is not specific to the hardware path; main loses in both. I am bisecting main against the older base now (a GPU device restart between steps clears the post-loss state as a reboot does) and will post the merge it names.
@DoubleD17 on GitHub · 2026-11-30 19:40 UTC · original
RTX 5070 12 GB (driver 621.40), Ryzen 7 5800X, 64 GB, Windows 11: one of the 8–12 GB cards the PR lists as untested
Setup (from the runs' logs): 2560×1440 DLAA, frame generation off, 30 fps cap.
VICTORY_HW_RT=1 VICTORY_BVH_BUILDER=0VICTORY_BVH_BUILDER=1Speed and stability
c71899d9(3 + 3)84bd61e2(3 + 3)The darker picture: software vs hardware refit vs hardware rebuild
This is the matched check @akimfomin asked for:
VICTORY_HW_RT_REFIT=0.Mean luma (0–255) of fixed areas, median over the 80 frames. The camera sits a little differently between starts, so the areas are approximate.
What we see:
AI Assisted
@KruIN689 on GitHub · 2026-11-30 20:37 UTC · original
Notes from our fork, which carried an earlier head of this PR (before the LRU eviction, build budget and leases now in main). Shared so nobody repeats the dead ends. RTX 5080 16 GB, 9950X3D, 1440p native, DLSS off.
1. The first measure. Standing still at a save, HW RT gave 34.5 fps with 1.8 frames over 50 ms per 1,000. Software RT (
VICTORY_BVH_BUILDER=1) gave 9–18 fps. The card was 75 % busy, and the picture in captured frames looked right.2. 20-minute session, standing still.
3. BLASes never let go (the earlier head).
0x8007000E.4. Dead end: letting BLASes go when a later build overlaps their console range. It found 133,000 overlaps in 10 min, but took out BLASes still in use. Rehydrated ones have the title's own size, not the one our prebuild answer gave. fps fell to 8–17.
5. Dead end that may matter for leases. We placed AS buffers in pooled card-memory blocks, reused 2 s after a BLAS went (placed resources instead of one committed resource per BLAS). Making AS buffers had cost the list threads 15.8 s in a 10-minute roam, the biggest part of BLAS preparation. Pooling removed the device twice, each time after a ~4 s GPU hang, while committed resources never did. Our reading: a BLAS address can still be referenced after its map entry goes, possibly from a TLAS table filled on another list thread before its list was queued. With committed resources that dangling address is freed memory; with pooled blocks it gets reused by another BLAS. If main's leases reuse pieces, a hold of a few seconds past retirement, or keeping the BLASes a TLAS table names on that list, may be worth checking.
6. Smaller items.
(Measured and written with Claude Code, for KruIN689.)
@KruIN689 on GitHub · 2026-11-30 22:47 UTC · original
Final head, 20-minute session. Main
84bd61e2plus our fork's set (spread sweep, #3272, #3063/#3067, #4234),VICTORY_HW_RT=1. RTX 5080 16 GB, 9950X3D, 47 GB, Series X native 1440p, DLSS and FG off. Auto-driven roaming (walk and drive), 20 minutes in the world.Compared with the earlier head (notes above): the fps fall and the card filling up are gone. If the LRU eviction waits for a budget, sessions longer than 20 min may still be worth one look. On this card, HW RT now looks steady enough for long sessions.
(Measured and written with Claude Code, for KruIN689.)
@AsrieIDreemurr on GitHub · 2026-12-01 01:46 UTC · original
@eleboucher another data point for your bisect, from a different machine: same symptom, also clean on an older base is consistent with what you see.
RTX 4070 Ti 12 GB, Ryzen 9 7950X3D, 64 GB RAM, Windows 11, driver 621.40 (also seen on 621.24). Series X profile, 2560x1440, DLSS Quality, DLSS FG 2x, no frame cap, release build,
VICTORY_D3D12_DRED=faults. Each run is a scripted walk in the open world from the same save.Plain v2026.11.30.03 (
e1251c31), first two runs after a fresh reboot:VICTORY_BVH_BUILDER=1): device removed (0x887A0005) about 5.5 min into the world (~14 fps; this first run also compiled pipelines on the fly).VICTORY_HW_RT=1: device removed (0x887A0005) about 1 min 50 s into the world (~17 fps).Earlier, on v2026.11.29.05 (
41adb551) with a few open PRs merged locally, 12 uncapped runs all lost the device 2-4 min in, always 0x887A0005, DRED breadcrumbs empty, the log saying nothing of ours was running on the card. It made no difference whether FG was on or off, the driver was 621.24 or 621.40,VICTORY_SWEEP=0was set, or #3686 or #3706 (22a6600b) were merged.What does avoid it here: a frame cap. With
-Fps 13, the same build ran 84 minutes without a loss. That also fits your race reading, since DRED/Aftermath changing the timing hides it for you.Happy to test a candidate merge or revert once your bisect names one.
(Claude written this.)