The crash report names direct mesh dispatches; buffers and groups stay inside what there is

- The lists' notes for a lost device hold direct mesh dispatches too (pipeline,
  groups, user data): run n06c stopped among them.
- A mesh dispatch of more than 65,535 groups is cut to that (more is undefined
  on the host; said once). Vertex and index buffer views end with the copy they
  show.
- indirect::tests::loads_far_outside_views (a measurement): raw, typed,
  constant buffer and texture loads at the ends of 32 bits, uniform and per
  lane, samples at coordinates, levels and gradients that are no numbers: all
  198 ways end inside their views on the RX 7900 XTX.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
localandClaude Opus 5.5 committed 2026-11-25 07:09:17 -06:00
1 parent 67471988dc
commit ef556e4218
4 files changed
+217 -14

No files matched your search

+12 -3
View File
@@ -1308,7 +1308,7 @@ impl State {
shadow.refresh(list, v.address, u64::from(v.size));
*view = D3D12_VERTEX_BUFFER_VIEW {
BufferLocation: shadow.gpu(v.address),
SizeInBytes: v.size,
SizeInBytes: v.size.min(u32::try_from(shadow.left(v.address)).unwrap_or(u32::MAX)),
StrideInBytes: v.stride,
};
}
@@ -1326,7 +1326,7 @@ impl State {
shadow.refresh(list, v.address, u64::from(v.size));
let view = D3D12_INDEX_BUFFER_VIEW {
BufferLocation: shadow.gpu(v.address),
SizeInBytes: v.size,
SizeInBytes: v.size.min(u32::try_from(shadow.left(v.address)).unwrap_or(u32::MAX)),
Format: DXGI_FORMAT(v.format as i32),
};
// SAFETY: an open list; the view names a live host buffer.
@@ -2791,8 +2791,17 @@ impl State {
#[cfg(feature = "diagnostics")]
list.note_op(|| self.op_text(format!("mesh {x}"), false));
self.mesh_scissor(list, true);
#[cfg(feature = "diagnostics")]
if let Some(p) = crate::pipeline::host_pipeline(self.pipeline as This) {
list.ran_indirect(p.pso.as_raw() as usize, &p.name, crate::host::indirects::DIRECT, x, &self.user);
}
// (The host takes 65,535 groups in a dimension: more is
// undefined there.)
if x > 65_535 {
once!(x, "a mesh dispatch of more groups than the host takes: cut");
}
// SAFETY: an open list with everything set.
unsafe { l6.DispatchMesh(x, 1, 1) };
unsafe { l6.DispatchMesh(x.min(65_535), 1, 1) };
self.drew(crate::pipeline::host_pipeline(self.pipeline as This));
self.mesh_scissor(list, false);
DRAWN.fetch_add(1, Ordering::Relaxed);