GPU: a listed frame's trace shows the title's barrier calls
Diagnostics only. The trace of a listed frame named every command but not the barriers between them, so whether the title orders two dependent dispatches could not be read from it. Each barrier call now notes itself in its list: the enhanced form as its groups' (kind, count) pairs (0 global, 1 texture, 2 buffer), the legacy form as its barriers' kinds. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f342dcfcfb
commit
eed1670036
1 file changed
+9
@@ -372,6 +372,8 @@ extern "system" fn barrier(this: This, count: u32, barriers: *const Barrier) ->
|
||||
{
|
||||
// SAFETY: the title passes `count` barriers.
|
||||
let barriers = unsafe { std::slice::from_raw_parts(barriers, count as usize) };
|
||||
#[cfg(feature = "diagnostics")]
|
||||
list.note_op(|| format!("barrier kinds {:?}", barriers.iter().map(|b| b.kind).collect::<Vec<_>>()));
|
||||
let mut host: Vec<Barrier> = barriers
|
||||
.iter()
|
||||
.filter_map(|b| host_barrier(list, b))
|
||||
@@ -1499,6 +1501,13 @@ extern "system" fn barrier_groups(this: This, count: u32, _groups: *const u8) {
|
||||
&& let Some(list) = host_list(this)
|
||||
{
|
||||
use windows::Win32::Graphics::Direct3D12::D3D12_RESOURCE_BARRIER;
|
||||
// Which kinds of barriers (0 global, 1 texture, 2 buffer) and how many.
|
||||
#[cfg(feature = "diagnostics")]
|
||||
if !_groups.is_null() {
|
||||
// SAFETY: the title passes `count` groups of 16 bytes: kind, count, pointer.
|
||||
let groups = unsafe { std::slice::from_raw_parts(_groups.cast::<[u32; 4]>(), count as usize) };
|
||||
list.note_op(|| format!("barrier groups {:?}", groups.iter().map(|g| (g[0], g[1])).collect::<Vec<_>>()));
|
||||
}
|
||||
// SAFETY: the same layout; no resource named.
|
||||
let barrier = unsafe { std::mem::transmute::<Barrier, D3D12_RESOURCE_BARRIER>(UAV_BARRIER) };
|
||||
// SAFETY: an open list.
|
||||
|
||||
Reference in new issue
Block a user