Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
14 changes: 14 additions & 0 deletions crates/xcl/src/hle/d3d12x/real.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(()));
}
Expand Down
Loading