Give up the render-target reserve once targets settle; log the room test
The texture queue makes no new host copies while in use + kept for buffer copies + kept for render targets reaches 90 % of the card's budget. The target reserve (VICTORY_CARD_ROOM_FOR_TARGETS_MB, 3,072 MB less the targets made) never expired: at 1440p targets level off at 2.1-2.9 GB, so 160-990 MB stayed kept for targets that never came while thousands of textures waited (diag run 16:28, 10:59:54: 8,722 MB in use + 836 kept for targets against a line of 9,527 MB: no room). Now once targets hold half the reserve or more and have not grown by 64 MiB for VICTORY_CARD_ROOM_FOR_TARGETS_SETTLE_MS (20,000; 0: kept, as before), nothing is kept; growth of 64 MiB brings it back. Release builds logged no term of the room test after the world loaded. The 5-second texture line now gives them (in use, free texture blocks, kept for buffer copies and for targets, the line, room or not), and where the pass's time goes (looks again at uploaded slots, mapped-memory queries, host-copy digests, making copies and staging), since the pass hits VICTORY_TEXTURE_STAGE_MS every frame for about 20 textures. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
3cb7b8f1d0
commit
21b040da07
3 files changed
+151
-7
No files matched your search
@@ -8841,6 +8841,28 @@ impl Meter {
|
||||
crate::descriptor::host::STALE[3].load(Ordering::Relaxed),
|
||||
crate::descriptor::host::STALE[4].load(Ordering::Relaxed)
|
||||
);
|
||||
// What the queue's room test (`crate::resource::room`) weighs.
|
||||
if let Some([budget, used, blocks, buffers, targets, line]) =
|
||||
crate::resource::room_terms(host().and_then(|h| h.video_memory()))
|
||||
{
|
||||
let weighed = used.saturating_sub(blocks) + buffers + targets;
|
||||
tracing::info!(
|
||||
"the texture queue's room: {used} MB in use - {blocks} MB free in texture blocks + {buffers} MB kept for \
|
||||
card copies of title buffers + {targets} MB kept for render targets = {weighed} MB against a line of \
|
||||
{line} MB ({} % of a budget of {budget} MB): {}",
|
||||
crate::resource::room_percent(),
|
||||
if weighed < line { "room" } else { "no room, new textures wait" }
|
||||
);
|
||||
}
|
||||
let [looks, mapped, same, made, all] =
|
||||
[0, 1, 2, 3, 4].map(|i| crate::draw::HEAP_TEXTURE_MICROS[i].swap(0, Ordering::Relaxed) / 1000);
|
||||
if all > 0 {
|
||||
tracing::info!(
|
||||
"the pass over textures picked by index, in the last 5 seconds: {all} ms in all, of them {looks} ms looking again at slots uploaded whole, {mapped} ms asking what of a texture's memory is mapped, {same} ms asking whether a host copy holds what memory holds, {made} ms making host copies and staging uploads; uploaded since the start: {} textures, {} MB",
|
||||
crate::draw::HEAP_TEXTURES.load(Ordering::Relaxed),
|
||||
crate::draw::HEAP_TEXTURE_BYTES.load(Ordering::Relaxed) >> 20
|
||||
);
|
||||
}
|
||||
}
|
||||
if crate::resource::held_only() {
|
||||
let [copies, bytes, grown, whole] = [0, 1, 2, 3].map(|i| crate::resource::HELD[i].load(Ordering::Relaxed));
|
||||
|
||||
Reference in new issue
Block a user