d3d12: support normalized R16 depth UAV views #695

Closed
QemmHD wants to merge 1 commit from upstream-pr/695 into qemmhd/rt-depth-same-base-shapes
QemmHD commented 2026-11-24 12:16:46 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by QemmHD on 2026-11-24T12:16:46Z.


Claimed in #14 as RT-D16-UNORM-UAV. Depends on #261 and #689. This draft targets #689's branch so only the R16 view change appears in the review.

What and why

Slot 133 depth textures can receive a normalized R16_UNORM UAV request. The D16 storage plane has an R16_UINT image and rejects that request. Where the device can use the normalized storage format, create a mutable view of the same storage image and use the existing typed descriptor path. The two views read and write the same D16 bits. The integer-only allocation stays available on devices that cannot create the compatible view.

Tested

  • Windows 11, MSVC 2022 x64, RTX 4070 SUPER, NVIDIA 621.24. Vulkan validation passed the integrated depth UAV fixtures, including committed single-layer and placed three-layer mixed typed views, a normalized clear and exact readback. Existing D16S8 and same-address alias cases passed.
  • The offline integration stopped logging its earlier rejection of DXGI format 56. A later guest read violation still occurs.
  • The patch applies cleanly to #689 at ba9fb4392. Whitespace and game-data checks passed. The raw branch build stops at pre-existing slot-14 descriptor-heap bridge compile errors. The GPU results above come from the local Windows integration.

AI-assisted: yes (Codex).

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5471972811 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/695). Originally posted by [QemmHD](https://github.com/QemmHD) on 2026-11-24T12:16:46Z. --- Claimed in #14 as [RT-D16-UNORM-UAV](https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7131209544). Depends on #261 and #689. This draft targets #689's branch so only the R16 view change appears in the review. ### What and why Slot 133 depth textures can receive a normalized `R16_UNORM` UAV request. The D16 storage plane has an `R16_UINT` image and rejects that request. Where the device can use the normalized storage format, create a mutable view of the same storage image and use the existing typed descriptor path. The two views read and write the same D16 bits. The integer-only allocation stays available on devices that cannot create the compatible view. ### Tested - Windows 11, MSVC 2022 x64, RTX 4070 SUPER, NVIDIA 621.24. Vulkan validation passed the integrated depth UAV fixtures, including committed single-layer and placed three-layer mixed typed views, a normalized clear and exact readback. Existing D16S8 and same-address alias cases passed. - The offline integration stopped logging its earlier rejection of DXGI format 56. A later guest read violation still occurs. - The patch applies cleanly to #689 at `ba9fb4392`. Whitespace and game-data checks passed. The raw branch build stops at pre-existing slot-14 descriptor-heap bridge compile errors. The GPU results above come from the local Windows integration. AI-assisted: yes (Codex).
aslan2142 commented 2026-12-01 16:31:18 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T16:31:18Z.


Closing this PR because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime (d3d12/) available now. Thank you for the contribution! If you believe this PR was closed by mistake (for example, if it still applies to active tools, d3d12/, or general docs), please feel free to reopen it.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7317744344 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/695#issuecomment-7317744344). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-12-01T16:31:18Z. --- Closing this PR because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime (`d3d12/`) available now. Thank you for the contribution! If you believe this PR was closed by mistake (for example, if it still applies to active tools, `d3d12/`, or general docs), please feel free to reopen it.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
ProjectLeonida/mandy!695
No description provided.