From 66e8d136497e993816ab2d62ebf7ce772e325104 Mon Sep 17 00:00:00 2001 From: zorde23 <343316937+zorde23@users.noreply.github.com> Date: Tue, 24 Nov 2026 10:07:51 -0300 Subject: [PATCH] D3D12.X: log the driver's refusal of a translated compute PSO The refusal went only through note_translation_error, which logs its first 40 distinct reasons; a retail title's mesh warnings use them up in the first seconds, so a 14 MB program the AMD driver worked on for 45 s and refused with E_OUTOFMEMORY left no line at all. Log hr, DXIL size and the time in the driver (first 16, then powers of two). Co-Authored-By: Claude Opus 5.5 --- crates/xcl/src/hle/d3d12x/real.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/crates/xcl/src/hle/d3d12x/real.rs b/crates/xcl/src/hle/d3d12x/real.rs index fed31e6224..2ac625ae83 100644 --- a/crates/xcl/src/hle/d3d12x/real.rs +++ b/crates/xcl/src/hle/d3d12x/real.rs @@ -3886,6 +3886,14 @@ unsafe fn translated_compute_pso_once(this: *mut c_void, f: PsoFn, desc: *const driver_cache::note(true, None); } if hr < 0 { + // in the log itself, not only through note_translation_error's first 40 reasons (a + // retail game's mesh warnings use them up early): a big program the driver gives up on + // after a minute (E_OUTOFMEMORY at the commit limit) was not seen at all + static N: AtomicU64 = AtomicU64::new(0); + let n = N.fetch_add(1, Ordering::Relaxed); + if n < 16 || n.is_power_of_two() { + crate::xlog_warn!("D3D12.X: the driver rejected a compute PSO ({hr:#x}): {} B DXIL, {} ms in the driver ({} so far)", dxil.len(), in_driver.as_millis(), n + 1); + } note_translation_error(format!("the driver rejected the compute PSO with the translated CS ({hr:#x})")); return Some(Err(())); }