- A dispatch honours conditional rendering and the layer's copies do not, so a
SetPredication that skips copies also skipped the D24 conversion while the
copy ran. Conditional rendering is ended around the dispatch and begun
again; a test runs an upload and readback under a skipping predicate and
compares with the host's unpredicated run (it fails without the fix).
- A copy larger than maxStorageBufferRange (queried; 128 MiB assumed if not)
is split into dispatches by slices, or by rows of one slice; the descriptors
bind 256-byte-aligned windows of both buffers. depth24_convert_test splits
the 4096x4096 copy with a 1 MiB range and a pitched one with a 1 KiB range.
- make_pipeline destroys the layouts it made when a later step fails.
- depth24_convert_test is in the CI tool list; the docs say which GPU each test
exercises.
- R24G8_TYPELESS with a typed D24 DSV is compared with the host. SRVs of
R24_UNORM_X8_TYPELESS and X24_TYPELESS_G8_UINT are an empty slot in the
layer (no format mapping; stencil-plane views refused): reported by the
test and documented as a known gap.
- depth24.h: the D3D11.3 spec's FLOAT -> UNORM wording (3.2.3.6, 3.2.2) next to
what WARP and AMD were measured to do; "159" is 5215.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cs_barrier_divergent: wave32, 128 threads. Wave 0 and waves 1-3 take different branches, each with its own s_barrier; on RDNA they count against the same workgroup barrier, so wave 0 reads what wave 3 wrote to LDS (out[i] = 127 - i). Registered in check.py and scripts/run_gpu_tests.py as a wave32 dump that doesn't need 32-lane subgroups.
Passes on an RTX 4070 Ti with the current translator; it guards the behaviour for any change to barrier handling.
AI-assisted.
CheckFeatureSupport fell through to E_INVALIDARG for
D3D12_FEATURE_SHADER_MODEL and D3D12_FEATURE_ROOT_SIGNATURE, so a game
asking either got an error where the PC runtime answers. Report DXIL 1.0
and root signature 1.1, the versions this layer can honour rather than
the driver's maximum, clamp higher requests down, and refuse an undefined
value, a wrong DataSize and a null buffer, as the host runtime does.
With one mip the clamp changed nothing. On the two-mip texture the clamp is 0 left of x = 32 and 1 from there on, so a clamp read from the f16 pad turns the left half cyan and a dropped clamp leaves the right half on mip 0.
A shader that declares MinLod (image_sample_d_cl) needs the feature, and without it the validation layer reports VUID-VkShaderModuleCreateInfo-pCode-08740. A device without it is now a skip (exit 77), as in the other texture tests.
The follow-up to #349 that the #374 coordination note asked for. #349
fixed s_ff0_i32_b32 reading an inline constant or literal as a lane mask;
this adds a hardware and interpreter check for it.
ps_sff_imm runs s_ff1_i32_b32 on the inline constant 4 and the literal
0x00100000, and s_ff0_i32_b32 on the inline constant 61 and the literal
0x0000ffff: 2, 1, 20, 16. Read as a lane mask (all ones or zero from bit
0) the two s_ff0 words are -1; the s_ff1 words guard the path that was
already right.
- runtime/test/shaders/ps_sff_imm.asm, with its expected words in
check.py and run_gpu_tests.py
- the fixture (regen_fixtures.py) and a value test in
tests/semantic/test_value_semantics.py that runs it through the
interpreter, with an independent reference
AI-assisted (Claude Code). Tested on NVIDIA GeForce RTX 4060 Ti (subgroup
32), driver 32.0.16.2124, Windows 11: see the PR for the run on main.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keep both packed and volume textures in the bindless readback test. Place the volume upload beyond the UINT texture so the RGB9E5 upload cannot overwrite its first depth slice.
CreateCommittedResource refused DXGI_FORMAT_B4G4R4A4_UNORM. It now maps
to VK_FORMAT_A4R4G4B4_UNORM_PACK16: DXGI names channels from the low bits
up and Vulkan from the high bits down, so both have B in bits 0-3 and A
in 12-15. Vulkan 1.3 requires sampling it. Copies use two-byte texels,
and the shader-resource view is a 4_4_4_4_UNORM T#, which the GFX10
table already had.
d3d12_descriptor_test uploads an 8x8 texture with a different nibble in
every channel of every texel, checks the footprint (two-byte rows), and
samples it through set 0: all 64 texels match, each nibble n read as
n * 17.
The layer stores D24 as D32_SFLOAT_S8_UINT where the GPU has no D24 (the
Radeon 880M, AMD generally). Footprint copies of the depth plane now convert
through a compute pass: an upload turns the 24-bit words into the nearest
floats of d / 16777215, a readback quantises floats back (float multiply by
16777215, round to nearest even, as WARP and AMD's D3D12 driver do) and writes
0 in the unspecified top byte. Clears store the float of the quantised value,
so a texture reads back as D3D's quantisation of the clear value.
- src/depth24.h, vulkan_depth24.h, depth24_convert.comp (+ compiled SPIR-V):
reference conversion, the converter (pipeline, scratch, descriptors freed
once the submission completes) and the shader.
- vulkan_replay.h: depth24_as_float binding flag, convert jobs prepared with the
list and run around the copy, depth clear value.
- depth24_convert_test: all 16777216 words to float and back, 16777216 float
patterns against the reference, a pitched copy; d3d12_depth24_compare.h:
5215 clear values (whole-view and rectangle) against the host.
- d3d12_copy_compare.h: the D24 case now compares upload and readback with the
host instead of only the bit-preserving copies.
Depends on #610.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CreateDepthStencilView refused D3D12_DSV_DIMENSION_TEXTURE2DMSARRAY, so the descriptor held an
empty TargetView and any clear through it failed when the list was recorded. Multisample textures
have one mip, so the view is {resource, mip 0, FirstArraySlice, ArraySize}; the replay already
checks the range against the image and clears through a view of those layers.
d3d12_vulkan_device_test: a 4-layer 4x multisampled D32 texture, a view of slices 1-2 captures
that range and its clear replays; a view of slices 3-4 is refused at execute
(invalid_subresource). D3D12 can't copy a multisampled texture to a buffer, so the cleared
values are not read back. Without the change the test fails at the captured-range check.
docs/d3d12_vulkan.md: drop the duplicated RTV/DSV bullet and list the new dimension. The 1D and
1D-array DSVs need 1D textures first (D3D-63, #561).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
R24_UNORM_X8_TYPELESS (D24S8) and R32_FLOAT_X8X24_TYPELESS (D32S8) views
were refused ("view format not supported for this texture: 46") and wrote
a null descriptor, so shadow maps and depth reads of these textures found
nothing. They now write a T# of the texture's own depth format
(8_24_UNORM, X24_8_32_FLOAT) with the depth in R, which set 0 views
through the depth aspect.
d3d12_descriptor_test checks both formats next to their stencil views:
same address, the depth format's code, R from X.
Depends on: #668
Volume depth belongs in the T# depth field, while its Vulkan view has a single array layer. Route matching descriptors through the existing 3D binding so a shader can select W slices and use a view-relative mip.
PlaneSlice 1 of a depth-stencil texture, viewed as X24_TYPELESS_G8_UINT
or X32_TYPELESS_G8X24_UINT, now writes an 8_UINT T# (the format of the
console's separate stencil surface) at the texture's address, with the
eight bits in G and R, B, A as 0, 0, 1, as D3D12 returns them. set 0
views it in the image's own format with the stencil aspect.
A plane past 1, plane 1 of a texture without stencil, or another view
format stays a null descriptor with a log. d3d12_descriptor_test decodes
both stencil formats and checks the refusals.
The test was built but only run by hand, so GPU-specific failures (for
example the AMD GetResourceTiling one) never showed up in ctest. Return
77 when no Vulkan device can be created and register the test with
SKIP_RETURN_CODE 77 so CI reports it as skipped rather than failed.