Repository navigation
Descriptors: clamp view indices past a capped host heap to a null slot - #1133
rivaldodev wants to merge 1 commit into
Conversation
|
Tested head
I can't check the in-world hang without the game. AI-assisted (Claude Code). |
|
Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at be0fe04: Tested with AI assistance (Claude). |
The capped view heap takes Marvisak#1523's largest size the host accepts and keeps Marvisak#1133's layout (the last slot null for clamped indices). The Marvisak#1076 format commits are reverted in favour of Marvisak#1523's host-queried widening. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Combined with Marvisak#1523 (heap size the host takes) and Marvisak#1133 (last slot null): a capped heap now keeps DYNAMIC - 1 dynamic slots when it is large enough. Its test allows for the null last slot. With MIN_DYNAMIC, an RTX 5070 Ti run dropped 262,144+ draws for want of dynamic slots. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Automated triage for the maintainers. Proposed close: duplicate of a more complete open PR. It now merges cleanly into This PR detects a host that caps shader-visible view heaps at 1,000,000 ( If something here is missing from #1777, such as the DXIL handle-index test, a follow-up on top of #1777 would be welcome. This PR will be closed in 48 hours unless the author pushes a change or a maintainer removes the Generated by Claude Code |
be0fe04 to
0d19c4c
Compare
|
Rebased onto main (940d32f) and resolved the conflicts. Both CI Clippy configurations pass, along with the targeted regression tests. Four failures in the full test suite were also reproduced on unmodified main. Ready for review. |
|
RTX 5070 (Blackwell, driver 621.24), Ryzen 7 5700X, Windows 11, Rust 1.98.1 MSVC. No game files, unit tests only. Head
The two view heap cap tests ( Written with AI help (Claude/Kiro); the numbers are from runs on my machine. |
Adapted from Marvisak/VIctory#1133 to the existing fence_only analysis. Preserve memory fences and explicit overrides; add emitted-flag and NVIDIA hardware-dispatch regression tests. AI-assisted implementation and testing.
Verify the existing heap clamp protection from Marvisak/VIctory#1133: all shader-visible indices exist, dynamic slots never use the final null slot, and the NVIDIA device remains healthy. Tested on RTX 4070 Ti SUPER.
0d19c4c to
cae16e6
Compare
|
Split the two changes per triage feedback:
\�ictory-gpu\ lib tests pass (144 passed, 0 failed). Ready for re-review. |
Adapted from Marvisak/VIctory#1133 to the existing fence_only analysis. Preserves memory fences and explicit overrides, keys the shader cache by host wave width, and adds emitted-flag and hardware-dispatch regression tests.
Co-authored-by: openhands <openhands@all-hands.dev>
…amp to a null slot, head cae16e6) Conflicts with Marvisak#1751, text only, resolved as integration/play's 4dc038b (each file the merge touches is byte for byte play's): descriptor/host.rs keeps Marvisak#1751's middle branch (a host that takes PORTABLE_VIEWS but not HEAP_VIEWS) with Marvisak#1133's guard slot, and the dynamic-slot test asserts both Marvisak#1133's heap size and Marvisak#1751's dynamic range; host.rs keeps the depth-bounds query already on this branch with Marvisak#1133's cap probe after it.
Adapted from Marvisak/VIctory#1133 to the existing fence_only analysis. Preserves memory fences and explicit overrides, keys the shader cache by host wave width, and adds emitted-flag and hardware-dispatch regression tests.
Detect hosts whose shader-visible view heaps stop at 1,000,000 slots. Keep main's descriptor index clamps, using the smaller host cap for view handles while leaving sampler and uncapped-host bounds intact. Size small heaps to cover the same translated index range. Keep the last capped slot null across title slots, dynamic slots and copy-back view pairs, including dynamic ranges ending exactly at the cap. Keep main's source-based shader cache fingerprint and include the host cap among its translation settings. Tests check emitted DXIL handle indices at and beyond both heap bounds, small and exact-size capped heaps, and cache invalidation by the cap. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Rebased onto current
Ready for re-triage. |
cae16e6 to
aeb7b10
Compare
Detects hosts whose shader-visible view heaps are capped below the title's view heap size (1,245,184 slots — NVIDIA caps shader-visible view heaps at 1,000,000 slots, measured on RTX 4070 Ti SUPER / RTX 5060 / RTX 5070) and clamps translated view handle indices to a reserved null slot at the end of the capped heap. Hosts without a cap (e.g. AMD) translate as before.
What is in this PR
crates/victory-gpu/src/descriptor/host.rs: probes the host view heap cap (view_heap_cap), sizes small heaps to cover the same translated index range, and keeps the last capped slot null across title slots, dynamic slots, and copy-back view pairs (including dynamic ranges ending right at the cap).crates/victory-gpu/src/host.rs: records the detected host cap viavictory_shader::emit::set_view_heap_limit.crates/victory-shader/src/emit/{mod.rs,bitcode.rs,shader.rs}: uses the smaller host cap for view handle clamps while leaving sampler and uncapped-host bounds intact.crates/victory-gpu/src/shader_cache.rs: includes the host view heap cap in the shader cache fingerprint.shader_cache::build()(and thereforeuse_shader_cache) now initializes the host device (crate::host::host()) on first call if it does not exist yet, so the host's view heap cap is known before the cache key is fixed (e.g. invictory translate --cache). This is documented inshader_cache.rs.Tests
victory-gpu:144 passed, 0 failed(includinga_capped_view_heap_keeps_its_last_slot_null,dynamic_slots_are_held_until_released,lists_share_a_table_and_copies_keep_their_views, andthe_key_covers_translator_encoding_and_settings).victory-shader: tests check emitted DXIL handle indices at and beyond both heap bounds.Split from the original combined PR per triage feedback; the narrow-wave barrier change has been moved to a separate PR.