Merge branch 'local/next' into night/cpu

This commit is contained in:
local committed 2026-11-25 09:03:29 -06:00
commit e7c7210657
5 files changed
+655 -26

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)
});
@@ -2507,7 +2509,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,
@@ -2518,9 +2520,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).and_then(|()| crate::host::mapped(&host.device))
{
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)