Test fix for hosted runners, stencil diagnostics, and a stability warning

- Shader tests: a software adapter given as the default device is not taken
  for a hardware device, so the tests that need a real card skip there.
- Diagnostics: the stencil plane of dumped depth-stencil targets and the
  title's descriptions of its stencil views.
- README: the newest commits lose the GPU device shortly after start on the
  test machine; the cause is not found yet.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
fxcelessandClaude Fable 5.2 committed 2026-11-24 14:01:26 -05:00
1 parent 3b3ab69d5a
commit d895bd7028
4 files changed
+161 -4

No files matched your search

+24
View File
@@ -1860,6 +1860,30 @@ fn make(view: &View, at: D3D12_CPU_DESCRIPTOR_HANDLE) -> Option<Kept> {
View::Shader(resource, desc) => {
let resource = *resource as crate::object::This;
if let Some(texture) = crate::resource::host_resource(resource) {
// The title's views of textures with a stencil plane, as it
// describes them (format, dimension, component mapping, a
// pad, then first level, levels, plane): each distinct one
// once. They say how its shaders read the stencil plane
// (the lighting takes each pixel's material class and its
// "inside a room" bit from it).
#[cfg(feature = "diagnostics")]
{
// SAFETY: a live resource.
let own = unsafe { texture.GetDesc() }.Format.0;
if matches!(own, 19..=22 | 44..=47) {
static SEEN: Mutex<Vec<(i32, Option<[u32; 10]>)>> = Mutex::new(Vec::new());
let mut seen = SEEN.lock().unwrap_or_else(|e| e.into_inner());
if seen.len() < 64 && !seen.contains(&(own, *desc)) {
seen.push((own, *desc));
tracing::info!(
?resource,
texture_format = own,
view = ?desc,
"shader view of a depth-stencil texture"
);
}
}
}
let mut desc = desc.as_ref().map(srv_desc);
if !fits(texture, desc.as_mut().map(|d| &mut d.Format), false) {
return None;