One empty texture block made ahead by a thread of ours #684
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/684"
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 trustno1-coder/VIctory-NVIDIA. Originally posted by 0xkn0wh3r3 on 2026-11-28T03:32:47Z.
Stacked on #683 (and so on #630). New here: the last two commits,
One empty texture block made ahead by a thread of oursand its bench.Why
With
VICTORY_RIPE_BLOCKS=0, the launcher's setting, the thread that placed a texture no block had room for made the new 64 MiB block itself, and waited until it was resident and mapped.What
When a texture takes the last empty block and the texture queue has room (
resource::room_lately), a thread of ours (victory-block-ahead) makes the next one.VICTORY_BLOCK_AHEAD=0: none, as before.SPARE).Pool::finishmakes blocks ahead itself, so this is left out.Before / after
bench_textures_that_need_new_blocks(--ignored --nocapture,VICTORY_RIPE_BLOCKS=0): one 16 MiB texture placed every 4 ms, four to a block. RTX card, four runs each. The first texture makes the first block either way (7.7–9.9 ms). For the 95 placements after it:VICTORY_BLOCK_AHEAD=0)Correctness
an_empty_block_is_made_ahead_once_none_is_left(meant forVICTORY_RIPE_BLOCKS=0; it skips itself otherwise): once textures took every empty block, an empty block is there within 5 s, it is one made ahead (the counter moved), and the thread that made it has ended.VICTORY_RIPE_BLOCKSunset and=0, and with this switch on and off. The made-ahead test passed in five repeated runs. With the debug layer on it reports nothing.-D warningsis clean.cargo test --workspace --lockedpasses, apart from the twowatch::testsguard tests that fail now and then, which they also did in 1 of 10 runs on unchangedmain.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by 0xkn0wh3r3 on 2026-11-28T06:49:49Z.
Replaced by #816, one smaller change of the same kind (blocks made with the pool's lock let go, for both textures and staging). It has no switch and no separate thread making blocks ahead, and comes with before/after numbers against current main.
Pull request closed