GPU: opt-in exact conventional table CBV upload reuse #1455
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1455"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from fxceless/victory-fork. Originally posted by spk-c on 2026-11-27T10:18:40Z.
Summary
Add an opt-in list-local cache for conventional table CBV uploads (
VICTORY_CBV_REUSE_UPLOAD=1). Only exact source and size matches reuse a prior scratch fill; every recorded step other than Fill invalidates the cache. Limit reuse to non-null, non-overflowing sources and nonzero 256-byte-multiple sizes up to 64 KiB. No card-fill changes, direct memory binding or UMA dependencies. Original fallback preserved for other sizes.This is independent of root-view reuse (
VICTORY_LIST_REUSE). Coordinate with #1403, which changes the adjacent scratch bounds path; neither change is required to compile this branch.Validation
Based directly on
9a9091d. Local Windows package all-target/all-feature check completed and 2 targeted CPU regression tests passed (exact keys, copy/callback/reset barriers and size eligibility). Diff check passed. No gameplay FPS gain claimed. The standalone port now has explicit hardware coverage (below).AI-assisted, adapted from spk-c/victory-fork
81b46a9.Shared CI baseline repair
The original CI failure is inherited from upstream
9a9091d. This branch now includes the original shader lint fix from #1440 (7238c55, original authorship retained) and a shared current-main adaptation of the module-splitting approach in #1357 (584efbb). No policy limits or security checks changed. The shared baseline passes both full workspace Clippy configurations with warnings denied and the 248-file asset policy; this exact feature head passes local package Clippy in both configurations and asset policy. The upstream full CI is being rerun. These are shared prerequisites rather than part of the feature; they will disappear from the diff when merged into main. No hardware/gameplay claim.RTX 4090 hardware validation (2026-11-27)
The added opt-in ignored test
hardware_exact_table_cbv_upload_replaypassed in separate processes withVICTORY_CBV_REUSE_UPLOAD=0and1on a real NVIDIA GeForce RTX 4090 (not WARP). Three ordinary scratch uploads became two; the computed shader output matched for duplicate inputs, a CPU write/callback barrier, the final vector and two executions of the same recording. No device removal. The added test compiles with all features and passes strict package Clippy and asset policy. This is a functional hardware A/B, not a gameplay throughput claim. The new test-only commit reruns CI.Imported from fxceless/victory-fork. Originally posted by KainanP on 2026-11-27T15:13:47Z.
Independent A/B of this PR on the RTX 4060 Laptop, against
main9a9091d(its base).Bench:
pipeline::list_bench::table_bench(KainanP/victory-forkbench/desc-tables,#[ignore]) ports the draw sequence of our VIctory list bench to the fork. Each draw binds a material table (one constant buffer view and five textures the title placed in memory), and each table sits at its own place in the title's heap. A list has 2,000 tables, and half of them repeat the contents of an earlier one, as in #1379. A list is closed (timed) and reset every 2,000 draws. Cells are ns per draw for the whole sequence (table, root CBV, 4 constants, index buffer, draw), each the median of 7 interleaved processes, each process the best of 5. RTX 4060 Laptop, i7-14650HX. A headless Chrome from other work used about 2 cores. This bench times recording only: lists are not submitted, so fills done at submission do not show here.main9a9091dc966ddc,VICTORY_CBV_REUSE_UPLOAD=1An earlier run of 7 agrees:
main11,990 / 22,095, PR off 12,563 / 24,454, on 11,733 / 23,929. Single runs spread by ±30 % on this machine.So the recording threads see no difference beyond noise. Your saving is the scratch fills at submission, which this bench does not time. In the bench's tables (1 constant view and 5 textures), the constant view is about 0.6 µs of a table, while the texture views are about 10 µs and making the entries readable about 6 µs (diagnostics build).
Correctness. With
VICTORY_CBV_REUSE_UPLOAD=1:tables_show_their_viewspasses (every texture slot of the tables made for 64 draws, over three lists, holds the descriptor the host makes of its view, and its host texture);exact_table_cbv_cache_stops_at_non_fill_stepsandtable_cbv_reuse_only_accepts_bounded_aligned_sizespass;hardware_exact_table_cbv_upload_replaypasses with=0and with=1on the RTX 4060 Laptop.For the texture-view part: #1484.
AI use: Claude Code (Claude Opus 5.5).
Pull request closed