mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:50:52 +01:00
[PR #1558] [MERGED] d3d12_xs: make a D16S8 depth texture without UAV when the depth provider refuses it (RT-D16S8-UAV-NVIDIA-FALLBACK) #1584
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#1584
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/1558
Author: @QemmHD
Created: 11/25/2026
Status: ✅ Merged
Merged: 11/25/2026
Merged by: @QemmHD
Base:
main← Head:claude/d16s8-uav-nvidia-fallback📝 Commits (1)
3cf0a41d3d12_xs: make a D16S8 depth texture without UAV when the depth provider refuses it📊 Changes
5 files changed (+230 additions, -13 deletions)
View changed files
📝
docs/d3d12_vulkan.md(+11 -0)📝
runtime/CMakeLists.txt(+5 -0)📝
runtime/shims/d3d12_xs_device.cpp(+44 -12)📝
runtime/test/xbox_depth_storage_test.cpp(+49 -0)📝
runtime/test/xs_proxy_mock_test.cpp(+121 -1)📄 Description
Claimed as: RT-D16S8-UAV-NVIDIA-FALLBACK. The claim is posted on #939 (comment 7152724709) because #14 has reached GitHub's comment limit. The root cause is in #939, comment 7152637264.
Fixes the NVIDIA stop at the first landing screen reported on #939 by OreoFR.
What and why
Since #939, slots 76 and 133 hand a depth-stencil texture with unordered access to the depth provider. On a GPU with D24S8 attachments (every NVIDIA card), the Vulkan layer's
pc_format()makes the console's D16_UNORM_S8_UINT (format 118) as D24_UNORM_S8_UINT.Resource::enable_depth_stencil_uavaccepts only R16_TYPELESS, 118 and R32G8X24_TYPELESS, so it returnsE_INVALIDARG. Slot 133 passed that on, and the boot stopped on an int3 at the first landing screen. AMD keeps 118 native, which is why the merge passed there.Now, only when the provider call itself refuses (
E_INVALIDARGorE_NOTIMPL):The first refusal per slot is logged. Every other failure is passed on unchanged: the provider out of memory, the backing's own
CreateCommittedResource, a refused placement or description. A refused backing is released, and no placement range is registered for it.Follow-up (not here): teach
Resource::enable_depth_stencil_uavthe D24S8-made form of 118, so these textures keep their UAVs on NVIDIA.Tested
Windows 11, RTX 4070 SUPER (NVIDIA 621.24), VS 2022 + Ninja, RelWithDebInfo:
0bc810504+ the local form of this change, which fell back on any depth-path failure; the failure that occurred was the provider's refusal): the fallback fires once (slot 133, format 118, hr=0x80070057), no int3, 6,187 PresentX with 0 failed, 69/69 captures non-black, and the boot reaches the later first-run pages. Without it, 3 of 3 runs stopped on the int3 after 182-362 PresentX.xs_proxy_mock, newcheck_depth_provider_refusal: a mock provider refusing a format-118 texture (E_INVALIDARG,E_NOTIMPL) through slots 76 and 133 gets S_OK and the stand-in, with the refused backing released. Out of memory, a failing backing and a refused placement are still passed on.xbox_d16s8_refused_uav:LEONIDA_CONSOLE_D16S8=d24forces the NVIDIA format choice on any GPU, and slots 76 and 133 return a depth-stencil texture without unordered access.LEONIDA_VK_VALIDATION=1.xs_proxy_mockandxbox_d16s8_refused_uavfail at slot 76. With only the slot 133 part removed, they fail at slot 133.test_runtime_paths(tools/conformance/**), which is red on main since #939 and isn't touched here.GPUs tested: NVIDIA GeForce RTX 4070 SUPER, driver 621.24, Windows 11
AI-assisted: yes
Checklist
mainand merges cleanly.docs/design.md. (n/a)AI-assisted (Claude Code, Claude Opus 5.5).
🤖 Generated with Claude Code
https://claude.ai/code/session_01SR1Fv7eQNgZjM6miWPKjHf
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.