Skip to content
Draft
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
8 changes: 8 additions & 0 deletions crates/xcl/src/hle/d3d12x/bind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3381,6 +3381,8 @@ pub(super) unsafe extern "system" fn dispatch_mesh(this: *mut c_void, x: u32, y:
let _detail = crate::stall::detail_span(crate::stall::StallKind::DetailDraw);
let _t = crate::hle::api_cost::time_if(super::look_stats::deep(), crate::hle::api_cost::Call::DrawRecord);
let _c = capture_work(this, || super::capture::WorkKind::DispatchMesh([x, y, z]), true);
// (past the PC list's hook of draws: `depth_uav::before_work`)
super::list_x::depth_twins_before_work(this, true);
type PcDm = unsafe extern "system" fn(*mut c_void, u32, u32, u32);
let pc_dm: PcDm = std::mem::transmute(super::real::orig_fn(this, 79));
let (raw_pso, resolution) = with(this, |s| (s.pso, s.resolution.clone()));
Expand Down Expand Up @@ -3575,6 +3577,9 @@ unsafe fn execute_indirect_snapshot(
type F = unsafe extern "system" fn(*mut c_void, usize, u32, usize, u64, usize, u64);
let pc: F = std::mem::transmute(super::real::orig_fn(this, 59));
let dispatches = signature.dispatches();
// (its PC call goes past the PC list's hook, which XCL's own dispatches through
// ExecuteIndirect take: `depth_uav::before_work` here)
super::list_x::depth_twins_before_work(this, !dispatches);
let _detail = crate::stall::detail_span(if dispatches { crate::stall::StallKind::DetailDispatch } else { crate::stall::StallKind::DetailDraw });
let _t = super::look_stats::deep().then(|| {
crate::hle::api_cost::time(if dispatches {
Expand Down Expand Up @@ -4798,6 +4803,9 @@ pub(super) unsafe fn dispatch_flags(this: *mut c_void, x: u32, y: u32, z: u32, f
let _t = crate::hle::api_cost::time_if(super::look_stats::deep(), crate::hle::api_cost::Call::DispatchRecord);
let (bound_pso, resolution) = with(this, |s| (s.pso, s.resolution.clone()));
let _c = capture_work(this, || captured_dispatch(bound_pso, [x, y, z], flags), false);
// (it may write a depth twin: `depth_uav::before_work`; where the title put it, also when
// it is recorded at the submit)
super::list_x::depth_twins_before_work(this, false);
// (recorded at the submit through this call, with everything below: counted there)
if let Some(resolution) = &resolution {
if super::list_x::defer_retained(this, resolution, super::list_x::Deferred::Dispatch(x, y, z, flags)) {
Expand Down
Loading
Loading