D3D-78: Support Texture1D, Texture1DArray and Texture3D UAVs #213
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs rebase
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!213
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/213/head"
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?
@Andretuta on GitHub · 2026-11-24 02:45 UTC · original
ubiquitarianism:old-pr/9948→main· +2375 −394 · 35 files · 4 commits · merged 2026-11-25 02:33 UTCOriginal description (mentions and
#Nreferences are disabled; the numbers refer to the old repository):Summary
D3D-78, assigned to
@guimsolutions. Adds default and explicitTexture1D,Texture1DArray, andTexture3DUAVs toCreateUnorderedAccessView.Rebased onto upstream
mainatf847748cc76bd3777f9c070c4034eb2fc1c04e64, retaining the two linear D3D-78 commits. D3D-63 is already inmain(c7d5f8e8). The rebased translator keeps upstream A16 2D mip addresses and typed 3D mip loads and uses the existing W-slice guard only for tagged UAVs. The Vulkan harness keeps upstream geometry and push-constant-tail support. The descriptor refusal test now starts its read-only resource inCOMMONto comply with upstream resource-state validation.Implementation
Texture1Duses storage bindings 17ÔÇô19; storage-onlyTexture1DArrayuses 26ÔÇô28 (float, UINT, SINT). Default 1D-array UAVs cover the full array, but 1D-array SRVs remain unsupported. Upstream multisample SRV bindings 20ÔÇô25 are unchanged. Bindless sizing and the pipeline checker account for Vulkan descriptor limits, including update-after-bind limits.{0, 1}for 3D UAVs. Partial W ranges requireVkImageViewSlicedCreateInfoEXT,imageSlicedViewOf3D, androbustImageAccess; otherwise the runtime writes a null descriptor rather than exposing the entire mip. Tagged descriptors carryFirstWSliceand effectiveWSize. Storage coordinates use relative Z; float/UINT/SINT sampled loads rebase Z and return zero outside the range or at nonzero view-relative LOD. Untagged SRVs keep their original coordinates and LOD.R32_UINTvolume UAV whose descriptor SGPR group also feeds volume atomics uses the formatted storage view for load-after-atomic visibility in the same dispatch. Other sampled loads keep upstream visibility rules. 3D stores and atomics cannot write to the shared fallback on a lookup miss.shaderStorageImage{Read,Write}WithoutFormatdevice bits disabled to exercise Vulkan 1.3's per-format path. Emulated RGB9E5 retains its logical sampled format andR32_UINTbacking; generic operations that would need unsupported repacking or unpacking take the safe fallback.Validation for
476ad95fWindows: RTX 4090 (NVIDIA 621.01) and Intel UHD 770 (32.0.101.7088). GPU checks used the Khronos validation layer and synchronization validation.
--filter cs_texture_uavLEONIDA_PC_TAIL_UBO=1modes: 14 cases (10 compared with WARP) on RTX 4090 and 10 cases (8 compared with WARP) on UHD 770. Intel lacks sliced 3D views; rejection of unsupported partial views was verified. No validation errors in the UAV readback test.LEONIDA_W64_EMULATE=1)spirv-val206/206. UHD 770: 168 passed, 33 skipped,spirv-val205/205 translated. No failed GPU checks; each adapter adds two passing cases over exact upstream with unchanged skip counts.#782double-copy replay passed on both GPUs without validation errors; the synchronization self-test confirmed the layer was active.vk_pipeline_checkcompiled compute and geometry fixtures in both push-constant modes on both GPUs.test_all_nan_keeps_src0) and no unexpected failures.compileallandmake_game.py --helppassed.On exact upstream
f847748c, UHD 770 reproduced the same CTest failures:d3d12_descriptor(lod_mismatches == 0, line 2659) andd3d12_subgroup(fragment_default, line 611). The Intel fallback still cannot translateps_ij_computedwithoutPerVertexKHR; every translated module passed validation. CTest skips reflect missing game-derived fixtures, unavailable adapter features, or opt-in validation (run separately); GameInput was disabled without SDL3. Other GPU skips reflect unsupported features or fixtures covered by separate tests. Python skips reflect missing synthetic DXBC fixtures or POSIX-only tests.The requested
scripts/run_gpu_tests.pyintegration is included:--filter cs_texture_uavdispatches the Windows differential test, and the full runner also exercisescs_imgload_mip. Runner unit tests cover pass, fail, missing executables, translation failure, and stale SPIR-V.The regression creates and copies descriptors through the D3D12 shim, then dispatches a Vulkan compute pipeline with Leonida's real bindless set 0; this is not an end-to-end D3D12
Dispatchtest. Coverage includes UINT/FLOAT and typeless views, nonzero mips, invalid descriptors, preservation of neighboring layers and slices, coexistence with a typed 3D SRV, dynamicimage_load_mip, and active/inactive add and compare-and-swap withglc.In a separate earlier native D3D12 probe, the RTX 4090 and UHD 770 clipped writes to the selected W range. WARP
10.0.26100.9818rebased the view but wrote past a finiteWSizeunder overdispatch. The oracle therefore compares in-range writes; Vulkan preservation of neighboring slices is checked independently.Project compliance and AI disclosure
Only independently written synthetic fixtures were used. No proprietary game data, game shaders, keys, or protected content were used or included. AI-assisted implementation and review using OpenCode; validation is recorded above.
Previous contribution:
#773@cobrabm12 on GitHub · 2026-11-24 09:17 UTC · original
I ran an independent whole-mip Texture3D UAV test on the PR head at
33f4a5aed, using an RX 7600 XT, RADV 26.2.5 and Wine 11.21. All 12 views registered a bindless entry. GPU clear and readback matched all 2,034 texels across two mips in RG16_FLOAT, RGBA16_FLOAT, R32_UINT, R8_UINT, R11G11B10_FLOAT and RGBA8_UNORM. Mip zero used an explicit full WSize and mip one used UINT_MAX. The test forwards the actual robustImageAccess feature from the Vulkan harness.Only the synthetic test file was changed on this PR head. The result covers whole-volume clear and readback. Shader dispatch and partial-depth views were outside this test. Test patch and reproduction instructions. AI-assisted with Codex.