mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 21:55:52 +01:00
[PR #261] [MERGED] d3d12: support Xbox depth/stencil UAVs on committed and placed textures (D3D-991) #313
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#313
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/261
Author: @Andretuta
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/25/2026
Merged by: @aslan2142
Base:
main← Head:old-pr/9991📝 Commits (6)
943df64d3d12: support Xbox R32G8X24 depth and stencil UAVs (D3D-991, part 1)73b52fbd3d12: complete placed depth UAV arrays and fenced queue transfers (D3D-991)6ff0560d3d12: support Xbox depth UAVs through CreateCommittedResource3 (D3D-991)f69c56dMerge upstream main and reconcile Xbox slot 133 placement (D3D-991)1d5f9b0Preserve generic placed resource handling with a committed-only depth provider (D3D-991)632cb75Merge upstream documentation updates into D3D-991📊 Changes
23 files changed (+1824 additions, -82 deletions)
View changed files
📝
docs/d3d12_vulkan.md(+18 -0)📝
runtime/CMakeLists.txt(+19 -0)📝
runtime/shims/d3d12_com.cpp(+2 -0)📝
runtime/shims/d3d12_com.h(+6 -2)📝
runtime/shims/d3d12_vulkan_device.cpp(+194 -25)📝
runtime/shims/d3d12_xs_device.cpp(+86 -17)📝
runtime/shims/d3d12_xs_device.h(+34 -5)➕
runtime/shims/d3d12_xs_placed_depth.h(+125 -0)📝
runtime/src/queue_families.h(+10 -0)📝
runtime/src/vulkan_backend.h(+11 -4)📝
runtime/src/vulkan_bindless.h(+7 -2)📝
runtime/src/vulkan_replay.h(+231 -23)📝
runtime/src/vulkan_scratch.h(+7 -2)➕
runtime/test/d3d12_depth_stencil_uav_test.cpp(+556 -0)➕
runtime/test/d3d12_depth_stencil_uav_views.h(+79 -0)➕
runtime/test/d3d12_placed_depth_test.h(+115 -0)📝
runtime/test/device_proxy_test.cpp(+16 -0)➕
runtime/test/glsl/cs_depth_stencil_uav.comp(+55 -0)📝
runtime/test/replay_texture_barrier_test.cpp(+175 -0)📝
runtime/test/replay_uav_clear_offset_test.cpp(+38 -0)...and 3 more files
📄 Description
Original description (mentions and
#Nreferences are disabled; the numbers refer to the old repository):Re-submission of
#9480(D3D-991). The original PR was closed during the repository-wide closure. This branch preserves its commits and incorporates the subsequent slot 133 work from main. Original claim · Recovery discussionResource creation and synchronization
This change lets an Xbox shader read and write depth/stencil planes through a UAV and makes those writes visible when the game uses the depth attachment again. It supports single-sample, single-mip 2D textures and arrays in two format families.
R16_TYPELESSexposes raw depth bits throughR16_UINT.R32G8X24_TYPELESSexposes depth throughR32_FLOATand stencil throughR8_UINT.CreateCommittedResource3calls forwarded by the boot stack's slot 127. Allocation queries return the attachment's guest placement size for XMem accounting.D3D12_BARRIER_LAYOUTand validates it against the logical texture flags before creating or reusing an alias. Compatible live aliases share the GPU contents and retain separate COM identities. Incompatible or overlapping placements are refused. Buffers and other resources keep the upstream generic handler. A regression test covers a device with only the committed-depth provider registered.Validation
Windows 11 Pro for Workstations x64 build 26300, Core i9-14900K, 128 GB RAM, RTX 4090 with NVIDIA 621.14, Release x64, MSVC 19.44, Windows SDK 10.0.26100.0, glslang 16.6.0 and Khronos validation layer 1.4.363.1. All local fixtures were synthetic.
1d5f9b080are identical to those in the submitted head632cb75ad.main. The submitted branch does not include that correction. The unmodified branch and upstream both hit the same three source locations. Upstream report · Separate proposed fixtest_exec_computedandtest_image_atomics_guard, reproduced with the same failing assertions on the upstream baseline2d53a8055.6ff056074integration build, the boot-stack slot 127 forwarder created the previously refused R16 textures with 1, 3 and 6 layers. The XMem hooks charged and freed each allocation once. AAyberkU independently observed all three creations succeeding in a retail run using73b52fbfeand local routing changes. A different object still failed later in that run. Retail boot on this submitted head is unverified. Retail reportmain@d083a2cc3. The no-game-data check passed for all 23 changed files.Boot-stack integration
Depends on:
#7052(Xbox slot 127 forwarding)Depends on:
#7110(Xbox resource allocation sizing)Depends on:
#7679(slot 25 sizing in the integration stack)The XMem accounting comparison used
#7235. Hubcio511 and danekbiglike documented the earlier plane round-trip and placed R16 array work. Original integration notesAI-assisted (Codex).
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.