Skip to content

GPU: keep bounded sparse refresh spans for known unwatched buffers - #1406

Open
spk-c wants to merge 4 commits into
fxceless:mainfrom
spk-c:submit/sparse-unwatched-refresh
Open

spk-c wants to merge 4 commits into
fxceless:mainfrom
spk-c:submit/sparse-unwatched-refresh

Conversation

@spk-c

@spk-c spk-c commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

AI-assisted independent adaptation of spk-c#38 onto upstream 4c60466.

Default-off VICTORY_SPARSE_REFRESH=1 avoids copying large unrequested gaps between ranges of a known-unwatched shadow. Retains up to eight merged spans with a 64 KiB coalescing threshold and conservative union fallback. Keeps one job per shadow and all existing write barriers; current-range tracking only records refreshed spans. Unlike watched-page stamping (#1388) or cold-chunk skipping (#1358), this limits the range union for known-unwatched buffers. Logical omitted bytes are not measured PCIe traffic.

The original fork passed CI and explicit D3D12 tests. This independent port retains a CPU range regression; the fork-specific hardware test requires adaptation to upstream staging APIs. git diff --check passed; compile, asset policy and GPU retest are pending (host.rs size is a potential policy blocker, see #1357/#1361). No gameplay FPS claim. Draft.

CI baseline repair

The upstream 512 KiB asset-policy failure on main (#1342) is addressed in this branch by including the existing maintainer patch #1357 (original commit 450ed9bd, attribution preserved). No policy limit or security check was changed. The identical combined commit fab07c7f passed the full Windows CI in our fork, including Clippy in both configurations, workspace/asset-policy tests and serial GPU tests: https://github.com/spk-c/victory-fork/actions/runs/45912168987. The direct upstream check is being rerun on this head. The #1357 changes are a shared dependency, not part of this feature; they will disappear from the diff when that commit is merged upstream normally. Hardware/gameplay retesting is not implied by this CI result.

claude and others added 4 commits November 26, 2026 18:04
…the asset policy's 512 KiB limit

The check job fails on main: crates/victory-gpu/src/host.rs (528,954 bytes)
and crates/victory-shader/src/emit/lower.rs (535,588 bytes) are over the
asset policy's 512 KiB limit (fxceless#1342).

Only #[cfg(test)] modules move, verbatim apart from losing one level of
indentation; module names and paths are unchanged, no non-test code changes.

- host.rs: its eight test modules (tests, relay_tests, grouped_tests,
  late_tests, trail, spare, batch, queue2_tests) move to host/<name>.rs,
  the layout profile.rs and profile/tests.rs already use. 492,495 bytes.
- lower.rs: mod tests moves to emit/lower_tests.rs, declared with
  #[path = "lower_tests.rs"] as in fxceless#1322. 512,559 bytes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015kFDn6faAxnJwPKPwiCnj1
AI-assisted independent adaptation of fork PR #38.
@spk-c
spk-c marked this pull request as ready for review November 26, 2026 23:51
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.

2 participants