diff --git a/README.md b/README.md index e35903a1cf..a9fd19729b 100644 --- a/README.md +++ b/README.md @@ -137,7 +137,9 @@ xcl rpf D:\data\shaders.rpf --extract NAME --out folder `driver compile start #K` / `driver compile finish #K: … PSO, N B DXIL, M ms` pair (compute ones with `record HASH`, the console record's hash that `--measure-pso` and `--export-hlsl --record-hash` take), with whether it was gated and how long it waited; - `XCL_PSO_TRACE=1` logs every driver compile. + `XCL_PSO_TRACE=1` logs every driver compile. A huge compute program the driver refuses is + logged with the driver's verdict (`the driver refused the compute PSO of record HASH … with + 0x…`): its dispatches are skipped. - With `XCL_DRED=1`, a D3D12 device removal logs GPU breadcrumbs in `xcl.log`. XCL examines up to 4,096 command lists and reports up to 64 unfinished lists, starting with those on which the GPU completed at least one operation. diff --git a/crates/xcl/src/hle/d3d12x/real.rs b/crates/xcl/src/hle/d3d12x/real.rs index fed31e6224..8bf8e02e70 100644 --- a/crates/xcl/src/hle/d3d12x/real.rs +++ b/crates/xcl/src/hle/d3d12x/real.rs @@ -3886,6 +3886,20 @@ unsafe fn translated_compute_pso_once(this: *mut c_void, f: PsoFn, desc: *const driver_cache::note(true, None); } if hr < 0 { + // A huge program's verdict in the log itself: `note_translation_error` goes to the + // report, or to the notes of a cached-only attempt – a retail title's 13.8 MB program + // took an AMD driver 15 – 23 s and ~15 GB to refuse with E_OUTOFMEMORY in every run, and + // the log showed only its `driver compile finish` and the dispatches skipped after it. + if dxil.len() >= huge_pso_bytes() { + // (the record hash is the console program's, as in `driver compile start` and + // `xcl shaders --measure-pso`; the driver-cache name is the translated DXIL's) + crate::xlog_warn!( + "D3D12.X: the driver refused the compute PSO of record {record:016x} ({} B DXIL, driver cache {}) with {hr:#x} after {} ms in the driver: its dispatches are skipped", + dxil.len(), + driver_cache::name(&dxil, copy.Flags.0), + in_driver.as_millis() + ); + } note_translation_error(format!("the driver rejected the compute PSO with the translated CS ({hr:#x})")); return Some(Err(())); }