- UAV clears of A4B4G4R4: an R4G4B4A4_PACK16 layout row (red in bits
12-15, alpha in 0-3), unit-checked in conversion_checks and cleared end
to end where the layer reports a typed UAV (the driver's call: WARP has
one, AMD's D3D12 driver doesn't).
- FORMAT_SUPPORT reports IA_VERTEX_BUFFER only for formats input layouts
accept (vertex_format), not every format Vulkan can fetch: R8/R16
SNORM/SINT (and R8G8 SNORM/SINT) have no input-layout mapping yet.
- new_format_round_trips: each render-target format is cleared to
(-3, -0.4, 0.25, 7) on the layer and on the host and the bytes compared,
which catches a mapping of the right size but the wrong numeric type
(R16_SNORM as UNORM, R8_SINT as UINT); no value is an exact half step.
The host is the Vulkan device's own adapter, as in
compare_format_support, not the default one.
- A4B4G4R4 is skipped where the Vulkan driver can't sample
R4G4B4A4_UNORM_PACK16 (Vulkan doesn't require it), by the driver's
format properties rather than the layer's answers; B4G4R4A4 and
B5G5R5A1 are never skipped.
- d3d12_copy_xfmt: D16_UNORM <-> R16_UINT and R16_SNORM copies, the new
members of depth_colour_pair, against the host and WARP.
AI-assisted (Claude Code).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
small_float rounded to nearest even and turned any too-large value into
infinity. D3D11.3 3.2.2 says float-to-float conversion rounds toward zero
and a finite value too large becomes the largest finite (only infinity
stays infinity); ClearUnorderedAccessViewFloat on WARP and on NVIDIA
gives exactly that: R16 70000 or 65520 -> 0x7bff, 1e-7 -> 0x0001,
R11G11B10 (1e6, 1e6, 1e6) -> 0xf7fdffbf, B = 1/3 -> 0x1aa. The layer wrote
infinity (which a shader then turns into NaN) and rounded up.
d3d12_uav_clear_test's conversion checks asserted the old rule for 65520
and 1e-7; they now hold the host values, with overflow, infinity and
R11G11B10 cases added.
d3d12_clear, d3d12_com, d3d12_descriptor, d3d12_method_variants,
d3d12_resource_desc, d3d12_sampler2, d3d12_typeless_rtv and d3d12_uav_clear were
built but never added with add_test, so ctest and CI never ran them. Each now
exits 77 when there is no Vulkan GPU (DeviceStatus::unavailable), as
d3d12_vulkan_device_test does, and is registered with SKIP_RETURN_CODE 77.
(cherry picked from commit 2af37e5da368dd130ba23db385e812635cb1a768)
The CPU handle's slot is read while recording as the GFX10 T#/V# a shader
would load (docs section 3.4), so the clear works with whichever view
creation lands (#157, #328, #334) and with game-built descriptors.
- Buffers: vkCmdFillBuffer for elements up to 4 bytes, with the unaligned
ends copied from the filled middle; 8/16-byte elements are written with
vkCmdUpdateBuffer and doubled with copies. Rects are element ranges.
- Textures: vkCmdClearColorImage for whole views, vkCmdClearAttachments
for rects (UAV textures also get COLOR_ATTACHMENT usage when the format
supports it), in place in GENERAL; mip and layer range from the T#.
- Values follow D3D's Uint (raw low bits) and Float (converting) rules,
encoded in the view's format and cleared into the image as the value
that decodes those bytes in the image's own format (typeless resources).
- d3d12_uav_clear_test: hand-computed conversion checks, then raw,
structured and typed buffers and 2D, array and volume textures cleared
and read back through D3D12; refusals at record and replay.
AI-assisted (Claude Code).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>