Skip to content

Pool: empty texture blocks capped by the card's budget, behind VICTORY_SPARE_SCALE (#756) - #1658

Open
xiepeixuan wants to merge 1 commit into
trustno1-coder:mainfrom
xiepeixuan:review/784-rebase
Open

xiepeixuan wants to merge 1 commit into
trustno1-coder:mainfrom
xiepeixuan:review/784-rebase

Conversation

@xiepeixuan

Copy link
Copy Markdown
Contributor

Refs #756

Replaces #784, closed by the owner for conflicts; rebased on d4b5d51.

What it changes

VICTORY_SPARE_SCALE is off by default. With VICTORY_SPARE_SCALE=1, the number of empty texture blocks is capped at min(limit, max(budget/32/BLOCK, ripe target, 8 staging blocks), 64). When normal retention is allowed, the default 12-block ripe target means up to 768 MiB in empty texture blocks on 8–24 GiB budgets instead of up to 4 GiB.

The cap is applied after main’s existing host-pressure choice, so pressure can still trim further. The ripe target and staging, upload, and shared pool retention are unchanged. texture_scaling_does_not_trim_more_staging_or_buffer_blocks exercises the shared allocation-time reclaim path: the texture pool trims to the scaled cap, while the staging and upload/shared ceilings do not change.

How it was tested

  • GPU and profile (Series X or S, resolution, DLSS, frame generation, ray tracing): None; unit tests only.
  • Before: Windows, plain main at d4b5d517: 21 passed, 0 failed, 2 ignored (baseline job).
  • After: Windows, 674be5e4: 23 passed, 0 failed, 2 ignored (fork job).
  • cargo test passed for the crates it touches: Yes — cargo test -p victory-gpu --lib pool.

Checked for overlap

AI-assisted (Codex). Not run in the game here. Needs a run on an 8-12 GB card with VICTORY_SPARE_SCALE=1 and =0.

Reapply trustno1-coder#784 after trustno1-coder#394. Keep the existing host-pressure sweeps and staging, upload, shared, and ripe block retention.
@github-actions github-actions Bot added memory RAM or VRAM use, out of memory, leaks pr-performance Pull request: makes it faster or use less memory labels Nov 28, 2026
@github-actions github-actions Bot changed the title [pr-performance][memory] Pool: empty texture blocks capped by the card's budget, behind VICTORY_SPARE_SCALE (#756) Pool: empty texture blocks capped by the card's budget, behind VICTORY_SPARE_SCALE (#756) Nov 28, 2026
HailLucifer666 added a commit to HailLucifer666/VIctory-NVIDIA that referenced this pull request Nov 29, 2026
…e run something

THE BUG. Three classes, all found on main today: (1) the GPU tests silently
report as passed on any machine without a WARP adapter -- WarpHarness::new()
returns an Option and every acquire site does `let Some(...) = ... else
{ return }` (indirect.rs around 894, 970, 1025 and more), so the suite's green
says nothing about whether the GPU tests executed; (2) cargo reports a filter
that matched no test as exit 0, so a narrowed command reads as a pass; (3) a
workflow file GitHub cannot load produces no run at all, and nothing in CI
reads ci.yml itself before GitHub does. The pre-commit hook was also committed
100644, which makes every POSIX clone skip it in silence (found with
git ls-tree; the same defect the Marvisak line shipped and fixed).

THE FIX. Port the checks our Marvisak PR #2854 lineage shipped there: `cargo
xtask test-gate` counts what each test binary announced (running N tests)
against what it reported (test result: ...), refuses a run that executed
nothing, refuses reports it cannot attribute to a binary cargo named, and
parses CI's colored output; `cargo xtask workflows` shape-checks every file
under .github/workflows, including duplicate keys (yaml-rust2 keeps the later
value; GitHub refuses the document outright) and typechanged entries; policy
--staged now fails closed on a staged entry the index cannot serve (a gitlink,
an unspellable name) instead of skipping it; the hook runs both checks and its
skip message names both; the hook is committed 100755; CI builds first and runs
the gated binaries after, so a red run cannot hide behind a compile.

WHY NOT HYPOTHETICAL. Main is red right now (issue trustno1-coder#1267) precisely because the
suite's own account was unreadable; on our Marvisak twin the same tooling
refused a green-but-empty run in CI and caught a lost hook mode a green run
missed.

SCOPE. The WARP skip is made loud in a follow-up, not here: turning skips into
panics before we know whether CI's runner has a WARP adapter could turn CI red
on machines that were honestly skipping. The first CI run of this PR answers
that question. The gate parses cargo's output shapes as they exist today; a
--format json run is refused rather than guessed at.

PROVENANCE. Ported from our Marvisak/VIctory PR #2854 branch (staging-bounds
and pipeline-library fixes from the same line landed upstream as trustno1-coder#1658/trustno1-coder#1660);
carries that branch's second-review fixes: policy --staged fails closed like
its sibling, duplicate keys are refused, typechanged staged entries are listed,
and the hook's skip message names both checks.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

memory RAM or VRAM use, out of memory, leaks pr-performance Pull request: makes it faster or use less memory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant