Repository navigation
Conversation
|
Tested on Windows 11 + NVIDIA GeForce RTX 3060 Ti (8 GB, MSVC Tested
Not tested: AI use: Antigravity ( |
|
The RTX 3070 Ti run in #71 stopped among mesh-only shaders Would you be able to check whether either hash takes #413’s direct-heap materialization path? A matched diagnostic run with only #413 added could report whether the selected slot has a valid title view, whether its actual host descriptor was materialized with the expected kind, and whether the same stop persists. If both use rebuilt tables, #336’s allocation fallback and #420’s selected-entry coverage are closer controls. We can track a missing compute producer separately once there’s a specific producer-to-consumer resource. Aggregate slot outcomes and shader hashes are sufficient. Ampere report |
|
Tested The pipeline and descriptor-method overlaps were resolved locally without dropping either side. On the real title path there were zero host-pipeline refusals and zero packed-format texture-creation failures. This run did not hit the previous Only aggregate counts and error classes shared, no game data or raw game logs. AI-assisted (Kimi Code). |
|
Follow-up: world loading regression fixed (2 commits) While the world streams in, bindless slots change at nearly every submission. Loading went to ~0.3 fps, and the title's hang watchdog then fired, for three reasons:
Changes:
Live check (RTX 5090, diag build, start screen → loading → world), per-frame numbers:
The run ended with a host Tests: 🤖 Generated with Claude Code |
|
Follow-up to the combination test above: a second run with read-only value observation reproduced the same null write in title code and again had no host-device removal. Static inspection of the local executable shows that this is an explicit absolute-null write on a fatal path, not an arbitrary corrupted pointer. The associated global pointer is updated repeatedly during execution, so "the callback was never registered" would not explain it. The remaining question is why that particular thread takes the fatal path. No disassembly, game addresses, game data or raw game logs shared. AI-assisted (Kimi Code). |
|
Follow-up: record-time contention (126388e) In a build with many recording threads, the world spent 10–32 s per frame in bindless record work (summed over threads). Draws were serializing on the heap's lock, and that lock is also held while a submission makes its plan; placed textures were held under the global placed-texture lock across their uploads. Changes:
Live check (RTX 5090, diag build, an integration build with this branch plus other open GPU PRs,
Loading holds the 60 fps cap with 0.1–1.9 ms preparing and bindless work at 0.0 ms. The run ended with the separate known host
🤖 Generated with Claude Code |
|
Reviewed Slots the title copies as bytes never reach bindless shaders. A slot is marked changed only when So a slot filled by a byte copy stays null, and a tracked slot overwritten by a byte copy keeps viewing the old resource. Eviction can free a placed texture someone still holds. Before this PR The SFI0 heap check in Smaller: textures behind real resource objects are not tracked for bindless ( Not covered: the title (no game data here). |
|
Thanks @marquezinii for the thorough review and repro tests — pushed a follow-up commit addressing all three findings:
Verified: @aycow — regarding |
|
Tested on an RTX 4070 (Windows 11, driver 621.01), diag build of |
|
Thanks @SantannaCarlos for flagging the monotonic copy-volume growth (136 MB -> 5.98 GB/frame) and
Added |
|
Retested Copy volume: fixed. Per-frame copies now settle at 360–450 MB and stay there. That is the level of the same stack without this PR (380–420 MB). Neither run hit
GPU memory still grows. Process GPU memory (dedicated plus shared, sampled every 10 s), new head, runs 1 / 2:
Frame cost. Copies still take 1.0–1.6 s per frame (0.5–0.9 s without this PR). On top of that, "bindless plans" take 0.2–0.25 s and "bindless records" up to 1.1 s per frame. World frame rate: 0.2–0.3 fps, against 0.4–0.8 without this PR and 0.1 with the old head. On this stack, two hunks in |
|
Tested on an RTX 3060 12 GB (driver 621.01, 32-lane waves), Windows 11,
Both runs: the world renders black (subtitles and credits only), then On this card #413 did not remove the null heap reads behind the hang (for example |
|
Security review note on the new |
|
One remaining case from #754 is an ordinary resource-backed texture SRV reached through The ordinary slot retained a host SRV. After This narrows the remaining question to how an ordinary bindless texture gets its first upload when there is no earlier copy or table use. We haven't identified a world material that takes that path. If one turns up in a capture, the view kind and the last upload or copy for the same texture would distinguish this case. |
…, refreshing only changed slots Resolved: descriptor.rs replays queued writes before publishing the heap (HEAD) and wraps it in an Arc (PR); host.rs runs prepare_bindless then take_retired (#135), Batch::flush keeps HEAD's coalesced ranges; pipeline.rs takes the PR's translate with HEAD's wave target; watch.rs takes the PR's (HEAD's unguarding inside); buffer_uav keeps HEAD's raw-window fallback; tests from both sides. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
No conflicts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
This PR (through
On Windows 11 with an AMD RX 9070 (RDNA4), both CI clippy runs are clean and It also passes together with #632, #539, #334 and #453 (366 tests): |
…Heap[] slots materialized and refreshed) Brings wbkepler/gpu/bindless-heap-materialization-fast into combo3: buffer SRVs/UAVs, CBV bounce slices, placed streamed textures and title-written texture SRVs reached through ResourceDescriptorHeap[] are made and kept up to date for the draws and dispatches that index the heap directly. Conflicts, combined: - descriptor.rs: Marvisak#413's Arc'd host heap (host_arc, HostHeap::new with the title heap start) inside our get_or_init that publishes the heap only after replaying the queued writes; our lock-free fast path for a made heap restored (Marvisak#413 had dropped it, needed only for the old race). Our RTV host_desc(dimension, colour) typeless handling kept as is. - descriptor/host.rs: Marvisak#413's Bindless tracking fields, budget helpers, plausible/valid_title_address and tests, with our guard slot, spare (DYNAMIC = 1 << 18, SAMPLER_DYNAMIC), PORTABLE_VIEWS cap and warning, VICTORY_VIEW_HEAP_CAP, block_count null fill, free_table/free_space, view_fits, raw_window, typeless fits() (Marvisak#876 port), "title slot past the host heap" diagnostic and probe_view_heap_sizes. HostHeap::with takes the title start and sets up Marvisak#413's bindless state; our tests call HostHeap::new with a 0 title start. - pipeline.rs: Marvisak#413's RootType import and resource_heap/writes_memory detection, with our host target passed to host_shader; our VICTORY_DEBUG_PS_PROBE and VICTORY_DUMP_SHADERS(_ONLY) / VICTORY_DUMP_FAILED_SHADERS around translation unchanged. - queue.rs: our VICTORY_SHOW_GBUFFER view, GBUFFER note and ungated presented(); Marvisak#413's test-only pass_frame. Multi-plane present, capture/dump calls and blinks unchanged. - Outside conflicts: resource.rs tests and pipeline/depth_bounds_test.rs follow the new HostHeap::new and Translated fields. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A4bpLmErkufJL3LGgfR561
- `presented()` is in every build (Marvisak#413's bindless code reads it). - `bindless_report` is diagnostics-only. - VICKY.md: the first albedo colours, and the NVIDIA heap cap as the blocker for both the black albedo triangles and the black lighting (the lighting's 160x90 input is written through a UAV past the cap). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A4bpLmErkufJL3LGgfR561
|
I reproduced two ordering failures on exact 6a0c5e9 merged with ffe310e (769d625). A dropped or later-submitted first recording made all 12 ordinary/placed bindless reads return the old texture contents on AMD, NVIDIA and WARP. Also, a CPU upload recorded before an intervening native GPU producer overwrote that producer in all six ordinary/placed controls. Composing exact #230 8d81f61 preserved all 12 GPU producer controls by deciding the CPU upload at submission. The ordinary #413 scheduler still reproduced stale reads on AMD. A fixture-only rearm on the actual consuming list restored all 12 discard/reorder cases. This points to retaining requests until submission and tracking the native resource generation, together with #230's ordered upload decision. Blindly recording extra copies on #413 alone regresses GPU-produced textures. Full GBV and source links are in the reproduction. |
|
I advanced the earlier control into submission-owned refreshes on the existing #413+#230 composition branch. The production changes are isolated in eba699d. Pending requests keep the native backing/staging and validate slot generations. Dropping/resetting a recording does not consume its request, and a submitted list can deliver it after #230 decides whether the GPU copy is already authoritative. Completion owns retirement. All 42 synthetic cases passed on AMD Radeon Graphics, RTX 5070 Laptop and WARP with full GBV. They cover discard, reordered submit, reset, descriptor replacement, same-native aliases, and the #230-marked copies/resolves path. Strict package Clippy and the no-default-feature build passed. The existing #413 discovery/recheck policy stays in place. Shader UAV writers and independently backed aliases still need separate ownership tracking. Would you prefer to take the production hunk into this PR after #230, or review the shared composition first? |
The eight commits of this branch squashed onto current main: - Detect SM 6.6 ResourceDescriptorHeap[] use in translated pipelines and materialize buffer SRVs/UAVs, CBVs (persistent bounce slices for misaligned ones) and placed/ordinary textures reached through bindless slots, keeping static table draws zero-overhead. - Keep a per-heap incremental plan, remade only for slots written, released views, evicted placed textures or remapped title memory; prepare each heap once per submission. - Bound bindless work while the world streams in (time budget, one recording thread at a time, throttled texture uploads), keep placed textures across eviction, detect byte-copied slots, skip unchanged bounce copies, bound placed-texture VRAM. - Schedule CPU uploads for ordinary resource-backed bindless textures. Conflicts with main resolved as main intends: queued writes are still replayed inside the OnceLock initializer (now made into an Arc), and the per-heap dynamic slot count (`extra`) replaces the fixed DYNAMIC. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… is submitted A bindless texture upload was counted as done when a list recorded it. If that list was dropped, or submitted after another list reading the texture, later lists skipped the upload until the next recheck and read the old contents. - Uploads recorded at draw time wait in a per-heap pending set; every list recorded meanwhile carries them too (validated again through the slot's view generation or the placed-texture lookup). - The submission of a list that carries one makes it uploaded (frame and recheck as before); dropped or reset lists leave it pending. - Uploads the texture module declines (host-written textures) count as done at once, as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
6a0c5e9 to
42c460a
Compare
|
Rebased onto current Rebase (
@aycow bug (a), fixed in
New tests:
The Bug (b) is not fixed here. That's a CPU upload recorded before a GPU producer on the native side, which then overwrites that producer's output. Fixing it means deciding at submission whether the CPU copy or the GPU copy is authoritative, which needs #230's ordered submission-time prelude. I've left it for #230 rather than bring that machinery into this PR. Your AI-assisted (Claude Code); checked on Windows 11 / RTX 5090. |
|
@wbkepler checked
Agreed on the dropped second |
|
I checked the follow-up at In the code, the three points read as described:
From my side, nothing is left open on those three. One note: the branch now conflicts with |
Summary
Materializes bindless SM 6.6
ResourceDescriptorHeap[]slots (buffer SRVs/UAVs, 256 B and 16 B-aligned CBVs through persistent bounce slices, placed streamed textures) for draws and dispatches whose shaders index the heap directly. Unlike a naive version, it costs next to nothing when nothing changed.Two commits:
(view index, generation), CBV bounce slices, placed-texture upload/state, and eviction ofPLACED_TEXTURESontitle_memory_remapped.// shortcut:UAV ranges over 8 MiB are not copied back (a view of a title's big shared heap would otherwise cost a full snapshot and compare per submission).Test evidence
cargo clippy --workspace --all-targetsandcargo clippy -p victory --features diagnostics --all-targetsreport no new warnings.cargo test --workspacepasses.cargo xtask policypasses.Note:
cargo fmt --checkdoes not pass on the base either (pre-existing formatting in several crates), so changed lines follow the surrounding style and unrelated code is not reformatted.🤖 Generated with Claude Code