Repository navigation
Conversation
|
Verified
Small edge-case note: in AI-assisted. |
|
Tested
No game data used. AI-assisted (DeepSeek V4.1 Flash coding agent). |
|
Merged with #86 ( So at least one of #83 / #86 / #74 / #100 needs to pick up the chosen No game data used. AI-assisted (DeepSeek V4.1 Flash coding agent). |
…ys inside the heap) Vaximous's Marvisak#483: every descriptor-heap index the lowering computes is bounded by the bound heap's guard slot (an index at or above it reads it), which the host passes in a user-data dword of its own. Conflict resolutions: - crates/victory-gpu/src/descriptor/host.rs: this tree's sizing is kept (Marvisak#86/Marvisak#83/Marvisak#251, and 2^18 dynamic slots on a capped heap); a view heap is made one slot larger, the guard slot, after its dynamic slots and outside the pool HostHeap::dynamic hands out (`spare` does not count it). On a capped heap that is 737,855 title slots, 262,144 dynamic ones and the guard at slot 999,999. Marvisak#483 had the guard at `count + DYNAMIC` with the pool sized by a constant; here the pool is sized by `spare` (Marvisak#86), so guard_slot() is `count + spare`. - A sampler heap's guard is its last slot, dynamic ones included (`count + spare - 1`), not Marvisak#483's `count - 1`: Marvisak#86 makes sampler tables afresh in a capped sampler heap's dynamic slots, which `count - 1` would have clamped away. - crates/victory-shader/src/emit/lower.rs, Lower::new: both fields are kept (`dead`, `guard_slots`). - crates/victory-shader/src/emit/valu_tests.rs: this tree's tests and Marvisak#483's new one are both kept. Changes beyond the PR: - emit/lower.rs, fetched_index (Marvisak#307's per-lane heap index, which Marvisak#483 did not know): it goes through heap_guard too. It is an address from a lane's data, as heap_index's. - emit/image_tests.rs (Marvisak#160's harness): the user data it fills gets the guard entries (host::guard). - descriptor/host.rs: tests the_guard_slot_is_past_every_dynamic_slot, and the guard's place in a_capped_view_heap_keeps_its_dynamic_slots. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
mercuryVM
left a comment
There was a problem hiding this comment.
Tested d8f063b on Windows 11, RTX 5070, MSVC: cargo test --workspace --no-fail-fast passes (228 passed, 0 failed; older base). cargo test -p victory-gpu --features diagnostics --lib portable_sampler passes on the hardware adapter.
- Capping the CPU staging block at
D3D12_MAX_SHADER_VISIBLE_SAMPLER_HEAP_SIZE(2048) for samplers, and attotalin general, means the temporary heap is never bigger than the heap it fills. The copy loops keep their doubling-then-blocks shape with the new size. - Returning
Noneafter a failed fill, instead of handing out a heap whose slots are undefined, is the important half. A later null-descriptor read then can't sample garbage.
No issues found.
AI-assisted (Claude Code).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…Marvisak#358 Marvisak#89 Marvisak#331 Marvisak#86 Marvisak#83 Marvisak#211 Marvisak#260 Marvisak#275) Conflict in crates/victory-gpu/src/descriptor/host.rs: gpu-state (Marvisak#251) moved the dynamic-slot search into free_table(); gpu-draw (Marvisak#86) bounds the search by the heap's spare slots instead of DYNAMIC. free_table() works over taken.len(), which is the spare count, so the helper is kept with gpu-draw's spare-based cursor wrap. Both sides' tests kept. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Automated triage for the maintainers. Needs rebase. This PR does not merge cleanly into current The content has not been reviewed yet; it will be once the branch is rebased onto Generated by Claude Code |
The heap initializer uses a CPU-only staging heap to copy null descriptors. It used the view-heap batch size (65,536 descriptors) for samplers too. A host can accept the shader-visible sampler heap and reject that temporary heap, leaving the shader-visible slots undefined.
Use the portable sampler limit to size each sampler batch. If initialization fails, report the error and stop before exposing the heap. This change is independent of the refusal-triggered sampler capacity fallback in #74 and applies to portable-sized heaps as well. Refs #65.
The new synthetic test requires successful initialization of a portable-sized sampler heap when the test has a D3D12 device. It passed on Windows WARP with
VICTORY_D3D12_WARP=1 cargo test -p victory-gpu --locked --features diagnostics portable_sampler_null_fill_fits_the_host_limit. The asset policy passed.