Publish GPU view addresses for dynamic descriptor snapshots #107

Closed
opened 2026-11-27 02:11:02 +00:00 by github-bot · 1 comment
Owner

@⁠TaynanGT on GitHub · 2026-11-27 01:33 UTC · original

A descriptor table containing a CBV is snapshotted into dynamic slots. Shader user data receives the new table offset, so a dynamically indexed buffer address looks up the dynamic slot in VIEW_ADDRESSES. The original descriptor path writes that metadata, but make_at and make_listed only write the stride. A snapshotted view can consequently look like a zero pointer. No renderer-port flag is required for the CBV snapshot. Snapshot decision · Offset binding · Dynamic descriptor creation

Synthetic regression

Put a buffer view and a CBV in one table. Snapshot it, then use a computed index to read the buffer address through the shader. Assert that the address matches the original view for both snapshot creation paths. Reuse the slot for a null or unrelated view, and check that the previous address is cleared.

Found during review of #37. Verified in the source at cc9ed86.

**@⁠TaynanGT** on GitHub · 2026-11-27 01:33 UTC · [original](https://github.com/TaynanGT/Vice-Tay/issues/107) A descriptor table containing a CBV is snapshotted into dynamic slots. Shader user data receives the new table offset, so a dynamically indexed buffer address looks up the dynamic slot in `VIEW_ADDRESSES`. The original descriptor path writes that metadata, but `make_at` and `make_listed` only write the stride. A snapshotted view can consequently look like a zero pointer. No renderer-port flag is required for the CBV snapshot. [Snapshot decision](https://github.com/TaynanGT/Vice-Tay/blob/cc9ed86c78ee44dae1392d0e101f7b3d2a91a9ec/crates/victory-gpu/src/draw.rs#L3813-L3827) · [Offset binding](https://github.com/TaynanGT/Vice-Tay/blob/cc9ed86c78ee44dae1392d0e101f7b3d2a91a9ec/crates/victory-gpu/src/draw.rs#L1781-L1793) · [Dynamic descriptor creation](https://github.com/TaynanGT/Vice-Tay/blob/cc9ed86c78ee44dae1392d0e101f7b3d2a91a9ec/crates/victory-gpu/src/descriptor/host.rs#L3082-L3143) **Synthetic regression** Put a buffer view and a CBV in one table. Snapshot it, then use a computed index to read the buffer address through the shader. Assert that the address matches the original view for both snapshot creation paths. Reuse the slot for a null or unrelated view, and check that the previous address is cleared. Found during [review of #37](https://git.gtahub.st/github/TaynanGT--Vice-Tay/pulls/37). Verified in the source at `cc9ed86`.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 02:11:02 +00:00
Author
Owner

@⁠TaynanGT on GitHub · 2026-11-27 01:34 UTC · original

The fix is in #111. Both dynamic snapshot paths now publish the title address alongside the stride and format bits, and reuse clears the old address. The descriptor-heap regression covers direct creation and cached copies. CI and the in-game path are still being checked.

**@⁠TaynanGT** on GitHub · 2026-11-27 01:34 UTC · [original](https://github.com/TaynanGT/Vice-Tay/issues/107#issuecomment-7207405783) The fix is in #111. Both dynamic snapshot paths now publish the title address alongside the stride and format bits, and reuse clears the old address. The descriptor-heap regression covers direct creation and cached copies. CI and the in-game path are still being checked.
This discussion has been locked. Commenting is limited to contributors.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/TaynanGT--Vice-Tay#107
No description provided.