New memory is resident before anything names it (VICTORY_WAIT_RESIDENT=0: as before)

Lists already on the card read our descriptor heaps as they are; only lists sent later wait for a new
heap's mapping. Run n08's loss: a page fault in a texture made that instant, in a new block.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
localandClaude Opus 5.5 committed 2026-11-25 07:40:47 -06:00
1 parent ba837eeff9
commit 0322b39abd
3 files changed
+77 -9

No files matched your search

+14 -4
View File
@@ -495,7 +495,7 @@ fn twin_texture(
let made = unsafe {
host.device.CreateCommittedResource(
&heap,
D3D12_HEAP_FLAG_NONE,
crate::host::not_resident(),
(&raw const d).cast(),
D3D12_RESOURCE_STATES(UNORDERED_ACCESS as i32),
None,
@@ -509,6 +509,7 @@ fn twin_texture(
TWINS[1].fetch_add(1, Relaxed);
return None;
};
let _ = crate::host::resident(&host.device, &texture);
crate::host::name(&texture, || {
format!("depth twin {}x{} f{}", d.width, d.height, d.format)
});
@@ -558,7 +559,7 @@ fn twin_texture(
let made = unsafe {
host.device.CreateCommittedResource(
&heap,
D3D12_HEAP_FLAG_NONE,
crate::host::not_resident(),
(&raw const d).cast(),
D3D12_RESOURCE_STATES(UNORDERED_ACCESS as i32),
None,
@@ -569,6 +570,7 @@ fn twin_texture(
tracing::warn!(error = %e, desc = ?d, "no twin for a depth plane");
}
texture.map(|texture| {
let _ = crate::host::resident(&host.device, &texture);
crate::host::name(&texture, || {
format!("depth plane twin {}x{} f{}", d.width, d.height, d.format)
});
@@ -2491,7 +2493,7 @@ fn host_texture_as(
unsafe {
host.device.CreateCommittedResource(
&heap,
D3D12_HEAP_FLAG_NONE,
crate::host::not_resident(),
(&raw const d).cast(),
D3D12_RESOURCE_STATES(
crate::host::legal_for(d.flags, crate::host::texture_state(state)) as i32,
@@ -2502,9 +2504,17 @@ fn host_texture_as(
)
}
};
if let Err(e) = made {
if let Err(e) = &made {
tracing::warn!(error = %e, desc = ?d, reserved, "no host texture");
}
if !reserved
&& made.is_ok()
&& let Some(t) = &texture
&& let Err(e) = crate::host::resident(&host.device, t)
{
tracing::warn!(error = %e, desc = ?d, "a host texture is not resident");
texture = None;
}
if let Some(t) = &texture {
crate::host::name(t, || {
format!("texture {}x{} f{} flags {:#x}", d.width, d.height, d.format, d.flags)