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

+12
View File
@@ -85,6 +85,18 @@ impl Host {
let adapter: IDXGIAdapter = factory.EnumWarpAdapter().map_err(err)?;
D3D12CreateDevice(&adapter, D3D_FEATURE_LEVEL_12_0, &mut device).map_err(err)?;
} else {
// A machine without a graphics card gives the software
// adapter as its default one (a hosted test runner): that
// is no hardware device, and the tests that ask for one
// skip it, as they do where there is none.
let factory: IDXGIFactory4 =
CreateDXGIFactory2(DXGI_CREATE_FACTORY_FLAGS(0)).map_err(err)?;
if let Ok(first) = factory.EnumAdapters1(0)
&& let Ok(desc) = first.GetDesc1()
&& desc.Flags & 2 != 0
{
return Err("the default adapter is a software adapter".to_owned());
}
D3D12CreateDevice(None, D3D_FEATURE_LEVEL_12_0, &mut device).map_err(err)?;
}
let device = device.ok_or("no device")?;