First uploads of textures picked by index run on a copy queue of their own, their slots show them when they have (VICTORY_UPLOAD_AHEAD=1; off); blips found while the camera moves

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
localandClaude Opus 5.5 committed 2026-11-25 10:50:14 -06:00
1 parent af0013dd76
commit 1cfc476831
7 files changed
+654 -21

No files matched your search

+22 -2
View File
@@ -2380,7 +2380,7 @@ impl State {
let _ = host.mirror(index, handle, true);
}
// Its bytes are in, or on the way there in a list before.
if late && texture.is_some_and(crate::pool::fresh) {
if late && texture.is_some_and(crate::pool::fresh) && !crate::texture::ahead::there(resource) {
if let Some(handle) = heap.handle(index) {
host.texture_slot_show_after(list, index, handle);
}
@@ -2398,7 +2398,27 @@ impl State {
}
continue;
}
if let Some(view) = &view {
// The first upload of a texture no list has used: on a queue of
// its own, and the slot shows it as soon as that has run.
let ahead = if late && !tabled && texture.is_some_and(crate::pool::fresh) {
crate::texture::ahead::take(resource, first, there.filter(|_| partly.is_none()).unwrap_or(u64::MAX))
} else {
None
};
if let Some(ahead) = &ahead {
use crate::texture::ahead::Taken;
let (Taken::New(job) | Taken::Known(job)) = ahead;
if let Some(handle) = heap.handle(index) {
host.texture_slot_show_ahead(job, index, handle);
}
if let Taken::New(job) = ahead {
crate::texture::ahead::send(job);
}
}
let late = late && ahead.is_none();
if let Some(view) = &view
&& ahead.is_none()
{
// (What was found mapped of it a moment ago is not asked
// again, unless the host copy may need more.)
crate::texture::PICKING.set(Some(there.filter(|_| partly.is_none()).unwrap_or(u64::MAX)));