Skip to content

Fill table constant buffers that flights write on the card - #522

Open
pug205gti6 wants to merge 1 commit into
fxceless:mainfrom
pug205gti6:pr/462-gpu-fill-table
Open

pug205gti6 wants to merge 1 commit into
fxceless:mainfrom
pug205gti6:pr/462-gpu-fill-table

Conversation

@pug205gti6

Copy link
Copy Markdown

A table's constant buffer view whose title memory a flight in the air may write is filled into upload memory at submission, which makes the submission wait for the flight to land: in the world, one such buffer a frame (480-512 bytes) cost a wait of 52-80 ms. With VICTORY_FILL_ON_CARD (on by default; 0 fills as before) the list copies those bytes from the host copy on the card, behind the flight on the same queue, into a device-local buffer of its own, and binds that instead. The first fills that still wait are logged with their source.

A table's constant buffer view whose title memory a flight in the air may
write is filled into upload memory at submission, which makes the
submission wait for the flight to land: in the world, one such buffer a
frame (480-512 bytes) cost a wait of 52-80 ms. With VICTORY_FILL_ON_CARD
(on by default; 0 fills as before) the list copies those bytes from the
host copy on the card, behind the flight on the same queue, into a
device-local buffer of its own, and binds that instead. The first fills
that still wait are logged with their source.

Co-authored-by: OpenBot <335604065+openbotgit[bot]@users.noreply.github.com>
@iurysf

iurysf commented Nov 25, 2026

Copy link
Copy Markdown

For whoever reviews this: it is the same commit as #462 (b39d4aa), where the description has the paired measurement on an RTX 4070 (−35.4 ms a frame, 4 of 4 pairs), the image comparison between the two arms and the card test. Either one can be merged; one of the two can be closed.

AI-assisted.

triippywhale pushed a commit to triippywhale/victory-fork that referenced this pull request Nov 25, 2026
A table's constant buffer view whose title memory a flight in the air may
write is filled into upload memory at submission, which makes the
submission wait for the flight to land: in the world, one such buffer a
frame (480-512 bytes) cost a wait of 52-80 ms. With VICTORY_FILL_ON_CARD
(on by default; 0 fills as before) the list copies those bytes from the
host copy on the card, behind the flight on the same queue, into a
device-local buffer of its own, and binds that instead. The first fills
that still wait are logged with their source.

Co-authored-by: OpenBot <335604065+openbotgit[bot]@users.noreply.github.com>
(cherry picked from commit b39d4aa)

fxceless#522 (iurysf). Conflict in draw.rs: main's table CBV
arm now skips null views (address != 0) and stages at most
constant_staging_bytes; the on-card arm takes both. The host copy's
refresh goes through Shadow::update, which leaves handed ranges alone, and
the on-card read is queued behind any copy between host copies.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017V7WBA8CxPD68KngjiMeJb
@Revens2

Revens2 commented Nov 25, 2026

Copy link
Copy Markdown

Duplicate of #462: @iurysf opened this patch 45 minutes earlier, and gh pr diff returns the same bytes for both (+192/-0 on 2 file(s), same title).

Please continue in #462 so the review history and any test data stay in one place.
Thanks.

@Headache3318

Copy link
Copy Markdown

Independent verification: PR #522 merges cleanly onto main, no conflicts. Build: success (8.27s). Tests: fail on Linux due to pre-existing host/target mismatch — #[cfg(windows)] modules excluded on Linux host, causing unresolved crate/module errors in victory-loader and victory-gpu. Same errors on unmodified main. PR modifies crates/victory-gpu/src/draw.rs (+12) and host.rs (+180). Machine: Arch Linux, kernel 7.3.5-arch1-1, 3x RTX 4090 driver 620.73.04, Proton, AI-assisted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants