[PR #695] d3d12: support normalized R16 depth UAV views #735

Open
opened 2026-11-26 20:18:52 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/695
Author: @QemmHD
Created: 11/24/2026
Status: 🔄 Open

Base: qemmhd/rt-depth-same-base-shapes ← Head: qemmhd/rt-d16-unorm-uav


📝 Commits (1)

  • d2b3065 d3d12: support normalized R16 depth UAV views

📊 Changes

5 files changed (+92 additions, -18 deletions)

View changed files

📝 docs/d3d12_vulkan.md (+4 -2)
📝 runtime/CMakeLists.txt (+2 -1)
📝 runtime/shims/d3d12_vulkan_device.cpp (+17 -3)
📝 runtime/test/d3d12_depth_stencil_uav_test.cpp (+49 -10)
📝 runtime/test/glsl/cs_depth_stencil_uav.comp (+20 -2)

📄 Description

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).


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/695 **Author:** [@QemmHD](https://github.com/QemmHD) **Created:** 11/24/2026 **Status:** 🔄 Open **Base:** `qemmhd/rt-depth-same-base-shapes` ← **Head:** `qemmhd/rt-d16-unorm-uav` --- ### 📝 Commits (1) - [`d2b3065`](https://github.com/ubiquitarianism/leonida/commit/d2b3065482df7e00e8e8343621af9deaf9ccfec4) d3d12: support normalized R16 depth UAV views ### 📊 Changes **5 files changed** (+92 additions, -18 deletions) <details> <summary>View changed files</summary> 📝 `docs/d3d12_vulkan.md` (+4 -2) 📝 `runtime/CMakeLists.txt` (+2 -1) 📝 `runtime/shims/d3d12_vulkan_device.cpp` (+17 -3) 📝 `runtime/test/d3d12_depth_stencil_uav_test.cpp` (+49 -10) 📝 `runtime/test/glsl/cs_depth_stencil_uav.comp` (+20 -2) </details> ### 📄 Description 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). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
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.

Dependencies

No dependencies set

Reference
starred/leonida#735
No description provided.