Packed textures stay in the upload queue; a texture on the card is refreshed when the card is full
Two fixes for textures that shaders pick by index, both proven with a slot listing before they were made: - The title keeps only a texture's small levels and places the next texture in the address range of the absent large ones. Described at full size every neighbour overlapped, and each view written took the textures beside it out of the upload queue and made their host slots null (tens of thousands of slots a run). A newer view now makes an older one stale only when it starts within that one's first 4 KiB. VICTORY_STALE_TEXTURES=overlap: the old rule; =0: never. Unit tests on the span table alone. The first room is lit with its walls and the characters' textures in the first launch with it. - With the card at its limit, a texture that already has its host copy is uploaded again when the title changed its memory (it took no new card memory, and was refused all the same). VICTORY_REUPLOAD_WHEN_FULL=0: as before. Logging only, off unless asked for: both video memory groups and budget moves; card accounting (VICTORY_CARD_ACCOUNTING=1); the slots a listed draw's shaders read, with their state (VICTORY_LIST_SLOTS=); a trace for the missing first-room walls (VICTORY_WALLS_TRACE=1 or 2). A card test of what a bare command costs (ignored by default): cargo test -p victory-gpu --release -- --ignored bare_command_cost --nocapture Known: about 3 to 5 frames a second; more than half of the texture memory on the card is held for levels the title has not loaded yet (next). Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
1 parent
d8bd2af52e
commit
8d3ce0190f
9 files changed
+1807
-32
No files matched your search
@@ -915,6 +915,16 @@ pub(crate) fn fingerprint(at: u64, len: u64) -> u64 {
|
||||
|
||||
/// Whether a title texture has a staging buffer: a list recorded its
|
||||
/// upload, and the lists that sample it check it at submission.
|
||||
/// For the frame listing: whether a list has uploaded `resource`'s staging
|
||||
/// buffer, and whether it was detiled since. None: it has none.
|
||||
#[cfg(feature = "diagnostics")]
|
||||
pub(crate) fn staged_state(resource: This) -> Option<(bool, bool)> {
|
||||
use std::sync::atomic::Ordering::Relaxed;
|
||||
let map = STAGING.lock().unwrap_or_else(|e| e.into_inner());
|
||||
let staging = map.as_ref()?.get(&(resource as usize))?;
|
||||
Some((staging.uploaded.load(Relaxed), staging.dirty.load(Relaxed)))
|
||||
}
|
||||
|
||||
pub(crate) fn is_staged(resource: This) -> bool {
|
||||
let map = STAGING.lock().unwrap_or_else(|e| e.into_inner());
|
||||
map.as_ref().is_some_and(|map| map.contains_key(&(resource as usize)))
|
||||
|
||||
Reference in new issue
Block a user