D3D-3D-VIEW-ARRAY-RANGE: use the single array layer for Vulkan 3D views #1860
No reviewers
No assignees
Labels
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
No project
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
No due date set.
Reference
leonida/mandy!1860
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/title-3d-view-array-range"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Pull request successfully merged and closed
Claimed in the coordination issue as: D3D-3D-VIEW-ARRAY-RANGE
What and why
A title-written GFX10 Texture3D descriptor can carry a nonzero
BASE_ARRAYin the same word as its depth. The runtime used that field as Vulkan'sbaseArrayLayer. Both the sampled and storage image view creation paths now use array layer zero and a count of one for a 3D view. Mips, aspects, 2D array layers and the original descriptor bytes used as the bindless key are preserved.In GFX10 SRV mode, hardware ignores the volume's
BASE_ARRAY. In raw UAV mode it is a W-slice offset. The raw descriptor path refuses that offset rather than binding a whole-mip storage view in its place. The API path continues to use Vulkan's sliced-view extension for partial D3D12 Texture3D UAVs.Runtime finding · Mesa's GFX10 descriptor builder · Vulkan image view valid usage
Tested
gfx10_descriptors_testdirectly with MSVC. The new assertions cover sampled 3D T#s with nonzeroBASE_ARRAY, recognition of a raw UAV W-slice offset, the mip range and 2D array layers. Restoring the old range mapping made the new 3D assertion fail.BASE_ARRAYtriggered the older layer's 01482 and 01483 VUIDs with the old range. The fixed range created the view with zero validation errors.python -I -B scripts/run_semantic_tests.py tests/semanticpassed 6,261 tests across 489 files.GPUs tested: n/a (software Vulkan on lavapipe)
AI-assisted.
Checklist
mainand merges cleanly.Verified the Windows shim at
857314142on an RTX 4090 (Windows 11, NVIDIA 616.64, MSVC). The standalone runtime bound both sampled descriptors with nonzeroBASE_ARRAYand refused the raw sliced UAV.I used a 33×33×33
R32_UINTvolume with four mips and a sampled view covering mips 1–2. I copied its descriptor into a CPU-written console heap, changed the fields below, submitted a command list, and looked up each original eight-word key. The modified keys all had index zero before the heap was registered.WORD5[3:0] = 1)The runtime logged the explicit unsupported-slice reason for the last slot. This probe checks native view registration and key identity. Separately, I translated the PR revision’s synthetic
cs_texture_uavshader using LLVM 23.1.6. It passed SPIR-V validation and all 14 GPU storage-image cases passed readback, including 10 compared with D3D12 WARP. Those writes exercise the API-created views. I did not sample texels through the two modified raw sampled descriptors.CTest also passed
gfx10_descriptors(CPU),d3d12_texture_uav, andd3d12_view_slices. All inputs were synthetic. AI-assisted verification with OpenAI Codex.Merged, thanks! A 3D view now uses the single array layer Vulkan allows, instead of a nonzero
baseArrayLayer.main24d8af66a: the only pass-to-fail wasxmem, the known first-run flake, which passed 5 of 5 on both devices when re-run alone.main6b843a4ad+857314142: it merges cleanly; the semantic suite passes (491 files, 6,312 tests, 0 files failed); the 15 docs and writer tests pass;check_no_game_data.pyis clean on the 3 changed files.AI-assisted (Claude Code, Claude Opus 5.5).