Levels on demand that takes effect, a shader cache key for ray tracing, a hang on the present's fallback; a bus bench and an audit #1470
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1470"
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 banaanpapa on 2026-11-28T20:24:06Z.
Three fixes, one measurement tool and an audit. Each is a commit of its own and can be taken alone. None of it was run in the title: there is no dump on the PC this was made on.
1. Levels on demand never took effect with the texture pool on
What was wrong.
host_texture_as(.., reserved = true)tried the pool of 64 MiB blocks before it looked atreserved, and the pool takes every texture the title fills, which is every texture levels on demand asks for. The texture came back placed in a block,Tiled::makefound no tiles in it, and the old kind was made.VICTORY_TEXTURE_POOLis on by default, soVICTORY_LEVELS_ON_DEMAND=1changed nothing for those textures.The change.
!reservedon the pool branch (resource.rs).Shown by.
a_texture_asked_for_without_memory_is_not_cut_from_a_blockasks for a BC7 1024x1024 chain without memory and has the card cut it into tiles. On an RTX 5080 it failed before the change and passes after.Bears on #1411, which turns levels on demand on by itself for budgets up to 8 GiB: without this it would turn on something that does nothing. The launchers still set the switch to 0, so nothing changes for a player until someone measures it.
2. Ray tracing on and off shared a shader cache key
What was wrong.
victory playsetsVICTORY_BVH_MISS=1in every run. The F1 menu's RAY TRACING setsVICTORY_BVH_BUILDER=1beside it, which turns the misses off inside the translator (intersect.rsbvh_miss). The key held the switch's value,1in both runs, so:The change. Where the switch is set, the key says which of the two the translator does (
victory_shader::emit::bvh_miss). A start ofvictory.exetranslates its shaders once more.Also. Six switches the translator reads were in no key:
VICTORY_LOOPS_WAVE,VICTORY_LDS_FIRST_INIT,VICTORY_LDS_INIT_HOIST,VICTORY_HDR_CLAMP,VICTORY_DEFRAG,VICTORY_SAMPLED_MARKS.VICTORY_DEFRAG=0in particular did nothing wherever the program it leaves out was cached already. They are keyed only while set, so caches made without them stay valid. #1437 adds the first two to the always-keyed list; either way works, and they would conflict in a few lines.A new test fails for any switch the translator's source reads that no list of the key names. Rebased onto
923e38cit found the last three of the six by itself.Shown by.
the_builder_beside_bvh_miss_changes_the_shader_cache_key(five settings, each in a process of its own),switches_keyed_when_set_change_the_shader_cache_key,every_switch_of_the_translator_is_keyed_or_known_not_to_matter.3. A hang on the fallback paths of
present_planesWhat was wrong. Where the two-plane composer cannot be made, or cannot record,
present_planesshows the base plane alone by calling itself. It droppedpresenterfirst, which is a reference into the guard ofHost::presenter, not the guard. The guard lived on and the call locked the same mutex again, which waits for ever. Clippy names all three places (dropof a reference does nothing).The change. The guard is dropped.
Not run. The path needs a composer that fails. It compiles and the crate's tests pass.
4. A free lets go of what is in place there
title_memory_freeddid not tellcrate::inplace; only remaps did. The tables forget it now. This is half a fix: the heap itself goes when the last list and slot that hold it do, and until then the title'sVirtualFreefails as it did. Nothing turnsVICTORY_INPLACEon by default. No test of its own.5. A bench of what the bus costs (
host/bus.rs)An ignored test, no title files:
Shaders read and store a 256 MiB buffer in each placement between two timestamps of the card. RTX 5080, Ryzen 9 9950X3D, two runs within 1 %:
shared_buffer, pool L0)uav_buffer)mapped_card_buffer)The figures for the card's memory are lower bounds. It would be useful to have the same from other cards, AMD above all.
6.
docs/unified-memory-audit.mdAn audit of the tree at
32ecacfagainst the five-track plan of Marvisak/VIctory issue 3703, with what other trees measured of the ways round the bridge, the waits that are left on the submitting thread, textures, the PC's memory, shaders and pipelines, and a road in phases. Its line numbers are of32ecacf; 205 commits have landed since, so check before relying on one. It makes no frame rate claim.7. Small things
32ecacfhad:shadow.rs,descriptor.rs,gameinput.rs, and one invictory-shader's tests.VICTORY_RELAY,VICTORY_LATE_WAIT,VICTORY_WIDE_BACKandVICTORY_ASK_ONCE, which are on;tiles.rsnamed a function that is calledcard_writes.Tested
Windows 11 26300, RTX 5080 16 GB, driver 617.42, Rust 1.98.1, on
923e38c.cargo test --workspace --locked: every test passes butxtask'srepository_passes_policy, which fails onmainthe same way (emit/lower.rs: 667523 bytes exceeds the 655360-byte limit).victory-gpu554 passed, 44 ignored;victory-shader348 passed.cargo clippy --workspace --all-targets --locked -- -D warningsdoes not pass, onmainor here: two findings inemit/lower.rsand some dozen invictory-gpu, all from commits since32ecacf, none in a line this changes.Not verified
levels_on_demand_on_the_carddid not happen: it wants the D3D12 debug layer, which is not installed here. It passes on the software adapter.🤖 Generated with [Claude Code]