Repository navigation
Conversation
The decoration bake names no texture in a table: a draw's constants and its buffer of 304-byte records hold view heap indices, so what it samples must be on the card through the queue of textures picked by index. A source still waiting there at the draw is baked wrong for the rest of the run (characters' skin black, blotched or gone). The early pass for bake draws knew four pixel programs by hash, ran the whole queue in its order under a budget, and uploaded nothing while the card had no room. Now a bake program is known by what it reads (one table with a buffer of 304-byte records and constants, which all 322 of them share), and before its draw the indices in its constants and in the records it walks are read: the texture views among them that still wait are uploaded first, whatever their turn, the budget and the room, up to VICTORY_BAKE_SOURCES_MB (1024) a draw. One the spans took for stale, which the title reads all the same, is put back and uploaded too. VICTORY_BAKE_SOURCES=0 only counts. A line per bake draw (the first, at counts that double, and the ones that still sample something wrong) says what the draw named and what was done about it.
From fxceless/victory-fork PR fxceless#1264 (UwUCammie): the pass that composites characters' skin once while a scene loads samples textures by heap index only; a source still waiting in the queue of textures picked by index was baked wrong for the rest of the run (black, blotched or missing skin). Bake programs are now recognised by their tables' shape (322 of them, not four hashes), and the texture views a bake draw's constants and records name are uploaded before it, whatever the queue's order, budget and room. Merged with our VICTORY_HEAP_WORKER path (the worker is not asked for a bake or a forced draw). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Tried this on an RTX 5080 (16 GB, Windows 11), Series X, prison cell opening. Card is tight on room here: around 250 texture passes a run find no room. 5 runs with it on, 2 with VICTORY_BAKE_SOURCES=0. Without it sampled_wrong_so_far ends at 71-84, with it 0 every time, so the counting side does what it says. One thing I can't explain yet: in 1 of the 5 runs with it on, Lucia's whole shirt went black at about world+170 frames and stayed black for the rest of the run. I have around 60 earlier runs of the same scene without this PR and never saw that. Could be chance, but my guess is the forced uploads ignoring room() push out something the shirt needs at display time, which is the case you mention under "what this does not fix". Frame times were about the same (median 107-113 ms with it, 99-108 ms without, my noise is about 5-10 ms). |
…e boat); legacy multiply-add as RDNA 2 runs it; 32-bit integer typed views move bits; removal and world-frame instruments; placed-slot census; skin-bake sources and reaper off by default - At a device removal: the sixteen seconds before it, one row a second, and the pipelines first drawn with lately; the PC by the minute. - Host objects let go can be dropped by a thread of their own (VICTORY_REAPER, off); the frame log counts the world's frames apart. - Legacy multiply-add as RDNA 2 runs it: fused, sources flushed, zero-factor rule (pull request #1026). - Typed buffer views of 32-bit integer formats are made in the float format of the same width (pull request #684). - Placed texture slots counted by what they show every 5 s; textures with levels on demand that show no level; VICTORY_TILES_SMALL_WHEN_FULL_MB and VICTORY_RETIRE_LEAN (both off). - Skin-bake draws' own textures: VICTORY_BAKE_SOURCES=count|1 (off; pull request #1264, hand-ported onto the texture worker). - README: status and frame rate as measured.
What comes from upstream (previous merge base 988aa41): - VICTORY_HEAP_WORKER=1 (off): textures picked by index uploaded by a thread of their own (fork pull request fxceless#1007); needs VICTORY_LATE_WAIT (stage > 0, which the relay sets by default). - VICTORY_TABLE_STAGES (off): a draw's stages share the tables they make afresh. - VICTORY_HEAP_LOCKS (off): made slots found without the slots' lock (atomic made_now), kept resources in 64 locks. - VICTORY_BAKE_SOURCES=count|1 (off): skin-bake draws' own textures (fxceless#1264 hand-ported onto the texture worker). - VICTORY_REAPER (off): host objects let go dropped by a thread of their own. - VICTORY_TILES_SMALL_WHEN_FULL_MB and VICTORY_RETIRE_LEAN (both off). - Legacy multiply-add as RDNA 2 runs it (pull request fxceless#1026). - Typed views of 32-bit integer formats made in the float format of the same width (pull request fxceless#684). - Remapping time split in the frame log (unmap, map, commit, our notes). - The corner box shows the machine's load beside the frame rate (VICTORY_FPS_COUNTER=fps: the rate alone; =0: off). - A report at a device removal; placed-slot census; constant buffer view of no bytes stays one (fxceless#1260, one copy kept); diagnostics runs 301-309. Conflicts: - README.md: ours kept as is; upstream's added as README.upstream.md. .github/workflows/ci.yml unchanged from ours. - crates/victory-gpu/src/descriptor/host.rs: both. Our SlotSet and slot flags beside upstream's KEPT_PIECES/heap_locks(); HostHeap::new takes the 64 kept pieces and kept_one, sized count + extra, with next/free sized by our per-heap dynamic count (extra), not DYNAMIC. The lock-free made_now lookup goes in mirror_inner, before the records' lock (our mirror_with_made is called with the lock held), returning (view, None); made_now stores added to our keep-views return and after our make/keep branches. - crates/victory-gpu/src/draw.rs: upstream's bake-sources/worker pass setup, with our TEXTURE_SHORT short_room/since_short in front of it; our ShortOfRoom guard kept before upstream's List/Ahead view lookup. - crates/victory-hle/src/modules/xmem.rs: our title_memory_view call (section.handle) plus upstream's RemapNotesUs timing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…xceless#1276 on top What the ten commits bring (two changes of the translator with no switch, the six-line box, seven switches off by default), and what one session measured here on build 73df053 with the ten switches of Status and the usual manoeuvre, its shader cache warm but for 380 programs: 1,794 frames, 6.41 fps, median frame 146 ms, 95th percentile 218; all 28 scripted presses read; the same room with the faults it had; no error line, no device loss. Before the merge: 6.52 to 6.67 fps, 143 to 147 ms, in five sessions. Private memory peaked at 16.5 GB (17.9 before). Rows for the skin bake's own textures (fxceless#1264, in with the merge and off by default; measured here with this tree's port: 185 wrong reads to none), for the sections of 2 MiB (fxceless#1274) and for the buffer copies let go with their view heap (fxceless#1276). Tests on the merged tree: victory-shader 258, victory-gpu 281 with diagnostics, victory-hle 128, the asset policy passes. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
The source path does bypass
|
…_SOURCES) Ported from fxceless#1264 by UwUCammie (4c14ca4) as it stands on fxceless main. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Dathinel ported this to the Cool Fox line and tested it on a 4 GB RTX 3050 Laptop. They report that 104 of 107 sampled bake draws read a texture that wasn’t resident before the change, versus 0 of 111 with it. They counted 106 textures (29 MB) uploaded ahead of those draws. That gives us an independent residency check. The report leaves the effect on the appearance of skin unverified. Tester’s report |
The decoration bake (the pass that composites characters' skin once while a scene loads) binds no texture through a table. Each draw's constants and its buffer of 304-byte records hold view heap indices, so everything it samples has to be on the card already through the queue of textures picked by index. A source still waiting at that moment is baked wrong for the rest of the run: black, blotched or missing skin on NPCs.
The early pass that is meant to cover this misses in three ways:
resource::room()says the card is full.Change
VICTORY_BAKE_SOURCES_MB(default 1024) per draw.VICTORY_BAKE_SOURCES=0only counts.sampled_wrongis counted after the passes: textures whose memory is mapped and whose host slot still shows nothing.The existing budgeted pass for the four listed programs is left as it is.
Measured
RX 7900 XT 20 GB, RADV 26.3.1, Wine 11.22, vkd3d-proton;
988aa41plus this commit, diagnostics build; opening cutscene to about 100 s; no relay, late wait or async submit, 24 ms pipeline wait. One run per row:VICTORY_BAKE_SOURCESThe 55 % rows use
VICTORY_TEXTURE_ROOM_PERCENT=55to get the accounting of a card shared with another game. That is a simulation: the queue is told there is no room while the memory is really there, so it shows that the bake no longer depends on the room check, not what happens when an allocation actually fails.Most of what a bake draw finds "waiting" on main is a streamed texture that is partly mapped and already uploaded as far as it is mapped; those are counted separately (
as_far_as_mapped_already) and left alone.What this does not fix
Related
#1097 raises the room line for bake passes and widens the due list for the four listed programs. This goes at the same problem from the draw's side and covers every bake program. They overlap in
early_textures, so whichever lands second needs a small rebase.Tests
cargo clippy --workspace --all-targets --locked -- -D warnings, and with--all-features: clean.cargo test -p victory-gpu --locked -- --test-threads=1under Wine: 204 passed, 2 failed. The two (drvwatch::tests::the_system_takes_the_subscription,watch::tests::holes_are_known_by_their_bits_only_when_noted_for_good) fail the same way on988aa41without this change here.