d3d12_xs: a console depth-stencil texture with unordered access is sized and created without it, again (RT-DS-UAV) #427

Merged
Mumogg merged 29 commits from upstream-pr/427 into main 2026-11-25 03:46:20 +00:00
Mumogg commented 2026-11-24 05:04:51 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Mumogg on 2026-11-24T05:04:51Z.


Claimed in #14 as RT-DS-UAV. Depends on: the stack up to #416 (their commits come first here; this pull request is the last commit). The code needs #375 (d3d12_xs_desc_clean.h).

What and why

The console allows ALLOW_DEPTH_STENCIL | ALLOW_UNORDERED_ACCESS on one texture. The PC runtime refuses the pair, so device slot 25 answered UINT64_MAX for the title's description, and a worker thread of the title stops on its own int3: tools/int3_cause.py reads the stop as a check on the upper half of the size that slot 25 returned.

Commit 4a8603436 by NiiRoZz (-x, authorship kept; an ancestor of main whose content is not in the tree): pc_resource_flags drops the unordered-access bit from a depth-stencil texture, for slot 25 and for the creation in slot 76. It is a stand-in and says so: the texture's unordered-access views then write no descriptor, so what a shader writes through them goes nowhere.

Adapted to main, as the commit message says: applied without b4d1ba179, which it followed in the original series (that one makes slot 25 clean only console-form calls), so slot 25 keeps cleaning every description as it does on main now.

Measured

Linux (Nobara 44, kernel 7.3), Wine 11.21 staging, RTX 5070 Ti (driver 615.78.08), clang-cl 22.1.8 + xwin SDK 10.0.26100, own 1.0.2.1 copy, network off, on main ece4ba5b3, with #142, #219, #328 and #387 applied on top for the boot runs (they are not in this branch).

--run Traced calls Ends with
up to #416 11,992 to 11,994 the worker thread's int3
+ this 12,043 the same int3, later, on another description

The log line slot 25: depth-stencil texture (format 19) sized without unordered access, which the PC refuses with it (stand-in) appears once. The description that trips the same check afterwards is an A8_UNORM render target, which is the separate pull request for RT-A8-TARGET.

xs_proxy_mock_test under Wine passes. The commit's own test case is in device_proxy_test, which builds here but does not run under Wine (it stops at device creation, on main too).

Not built with MSVC and not run on Windows.

AI-assisted (Claude Code); built and run on the machine above.

🤖 Generated with Claude Code

https://claude.ai/code/session_01HxBQf4pXH8PWpC5oZsM4bt

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5466439990 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/427). Originally posted by [Mumogg](https://github.com/Mumogg) on 2026-11-24T05:04:51Z. --- Claimed in #14 as `RT-DS-UAV`. Depends on: the stack up to #416 (their commits come first here; this pull request is the last commit). The code needs #375 (`d3d12_xs_desc_clean.h`). ### What and why The console allows `ALLOW_DEPTH_STENCIL | ALLOW_UNORDERED_ACCESS` on one texture. The PC runtime refuses the pair, so device slot 25 answered `UINT64_MAX` for the title's description, and a worker thread of the title stops on its own `int3`: `tools/int3_cause.py` reads the stop as a check on the upper half of the size that slot 25 returned. Commit `4a8603436` by NiiRoZz (`-x`, authorship kept; an ancestor of `main` whose content is not in the tree): `pc_resource_flags` drops the unordered-access bit from a depth-stencil texture, for slot 25 and for the creation in slot 76. It is a **stand-in** and says so: the texture's unordered-access views then write no descriptor, so what a shader writes through them goes nowhere. Adapted to `main`, as the commit message says: applied without `b4d1ba179`, which it followed in the original series (that one makes slot 25 clean only console-form calls), so slot 25 keeps cleaning every description as it does on `main` now. ### Measured Linux (Nobara 44, kernel 7.3), Wine 11.21 staging, RTX 5070 Ti (driver 615.78.08), clang-cl 22.1.8 + xwin SDK 10.0.26100, own 1.0.2.1 copy, network off, on `main` `ece4ba5b3`, with #142, #219, #328 and #387 applied on top for the boot runs (they are not in this branch). | `--run` | Traced calls | Ends with | |---|---|---| | up to #416 | 11,992 to 11,994 | the worker thread's `int3` | | + this | 12,043 | the same `int3`, later, on another description | The log line `slot 25: depth-stencil texture (format 19) sized without unordered access, which the PC refuses with it (stand-in)` appears once. The description that trips the same check afterwards is an A8_UNORM render target, which is the separate pull request for `RT-A8-TARGET`. `xs_proxy_mock_test` under Wine passes. The commit's own test case is in `device_proxy_test`, which builds here but does not run under Wine (it stops at device creation, on `main` too). Not built with MSVC and not run on Windows. AI-assisted (Claude Code); built and run on the machine above. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01HxBQf4pXH8PWpC5oZsM4bt
Dezmonius commented 2026-11-24 13:43:13 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Dezmonius on 2026-11-24T13:43:13Z.


Independent Windows A/B for the slot-25 allocation case. Native Windows 10 22H2 (19045), D3D12 WARP, MSVC 19.51.36256, Windows SDK 10.0.26100, Ninja Release. I used the same device_proxy_test source on the PR head 89fdb83e0 and its immediate parent adc4f314b (test source only copied into the control).

  • Parent: two failures, the depth-stencil descriptor retained the UAV flag, and console slot 25 did not report a usable allocation size.
  • PR head: both assertions and the rest of device_proxy_test passed. Direct PC/WARP still rejected the combined flags, and the buffer/colour-texture controls retained their UAV flag.
  • xs_proxy_mock_test passed on both builds.

This verifies the slot-25 sizing stand-in on Windows/WARP. It does not exercise UAV writes, the combined-flags slot-76 creation path, or retail boot. Synthetic tests only. AI-assisted (Codex).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7133236762 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/427#issuecomment-7133236762). Originally posted by [Dezmonius](https://github.com/Dezmonius) on 2026-11-24T13:43:13Z. --- Independent Windows A/B for the slot-25 allocation case. Native Windows 10 22H2 (19045), D3D12 WARP, MSVC 19.51.36256, Windows SDK 10.0.26100, Ninja Release. I used the same `device_proxy_test` source on the PR head `89fdb83e0` and its immediate parent `adc4f314b` (test source only copied into the control). - Parent: two failures, the depth-stencil descriptor retained the UAV flag, and console slot 25 did not report a usable allocation size. - PR head: both assertions and the rest of `device_proxy_test` passed. Direct PC/WARP still rejected the combined flags, and the buffer/colour-texture controls retained their UAV flag. - `xs_proxy_mock_test` passed on both builds. This verifies the slot-25 sizing stand-in on Windows/WARP. It does not exercise UAV writes, the combined-flags slot-76 creation path, or retail boot. Synthetic tests only. AI-assisted (Codex).
Dezmonius commented 2026-11-24 13:45:26 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Dezmonius on 2026-11-24T13:45:26Z.


Follow-up on slot 76, the committed-resource creation path. Same native Windows 10 22H2 / D3D12 WARP / MSVC setup as my slot-25 report. I added an identical local case to the parent test harness and linked it against both the parent (adc4f314b) and PR head (89fdb83e0).

The fixture is a synthetic 64×64 single-sampled R32G8X24_TYPELESS texture with the Xbox layout and both DEPTH_STENCIL and UNORDERED_ACCESS requested. Direct PC creation with both flags returned E_INVALIDARG on both builds; direct depth-only creation returned S_OK. Xbox slot 76 returned E_INVALIDARG on the parent and S_OK on the PR head. The resulting resource retained the depth-stencil flag, format and extent, used the PC-layout value UNKNOWN, and had the UAV flag removed. The rest of the fixture passed on the head.

This verifies creation of the depth-only stand-in. UAV writes and retail boot were outside the test. Synthetic data only. AI-assisted (Codex).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7133290744 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/427#issuecomment-7133290744). Originally posted by [Dezmonius](https://github.com/Dezmonius) on 2026-11-24T13:45:26Z. --- Follow-up on slot 76, the committed-resource creation path. Same native Windows 10 22H2 / D3D12 WARP / MSVC setup as my slot-25 report. I added an identical local case to the parent test harness and linked it against both the parent (`adc4f314b`) and PR head (`89fdb83e0`). The fixture is a synthetic 64×64 single-sampled `R32G8X24_TYPELESS` texture with the Xbox layout and both DEPTH_STENCIL and UNORDERED_ACCESS requested. Direct PC creation with both flags returned `E_INVALIDARG` on both builds; direct depth-only creation returned `S_OK`. Xbox slot 76 returned `E_INVALIDARG` on the parent and `S_OK` on the PR head. The resulting resource retained the depth-stencil flag, format and extent, used the PC-layout value UNKNOWN, and had the UAV flag removed. The rest of the fixture passed on the head. This verifies creation of the depth-only stand-in. UAV writes and retail boot were outside the test. Synthetic data only. AI-assisted (Codex).
3L1A5-1 commented 2026-11-25 01:58:55 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by 3L1A5-1 on 2026-11-25T01:58:55Z.


Native Windows + MSVC + NVIDIA result (the earlier Windows A/B here was on WARP). This is this PR's own commit, stacked on #416's commit only and without #414's three, which conflict with main (see #414). Both apply cleanly: 3L1A5-1/leonida@rebase/427 (a3ae2df9a, authors kept) on main b4b7756e8.

  • ctest: 318/318 passed, 0 failed (2 gameinput disabled, no SDL3). device_proxy and device_proxy_trace pass.
  • scripts/run_gpu_tests.py: 207 passed, 0 failed, 49 skipped. With LEONIDA_W64_EMULATE=1: 239 passed, 0 failed, 17 skipped.
  • No result differs from main on this machine.

Hardware: RTX 2060 SUPER 8 GB (Turing), driver 617.14, Windows 11 26300, 16 GB RAM, MSVC 19.44, RelWithDebInfo. Synthetic tests only, no retail run.

AI-assisted: yes

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7150181304 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/427#issuecomment-7150181304). Originally posted by [3L1A5-1](https://github.com/3L1A5-1) on 2026-11-25T01:58:55Z. --- Native Windows + MSVC + NVIDIA result (the earlier Windows A/B here was on WARP). This is this PR's own commit, stacked on #416's commit only and without #414's three, which conflict with `main` (see #414). Both apply cleanly: [`3L1A5-1/leonida@rebase/427`](https://github.com/3L1A5-1/leonida/tree/rebase/427) (`a3ae2df9a`, authors kept) on `main` `b4b7756e8`. - ctest: 318/318 passed, 0 failed (2 `gameinput` disabled, no SDL3). `device_proxy` and `device_proxy_trace` pass. - `scripts/run_gpu_tests.py`: 207 passed, 0 failed, 49 skipped. With `LEONIDA_W64_EMULATE=1`: 239 passed, 0 failed, 17 skipped. - No result differs from `main` on this machine. Hardware: RTX 2060 SUPER 8 GB (Turing), driver 617.14, Windows 11 26300, 16 GB RAM, MSVC 19.44, RelWithDebInfo. Synthetic tests only, no retail run. AI-assisted: yes
aslan2142 commented 2026-11-25 03:47:04 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-11-25T03:47:04Z.


Marked merged through #430, whose branch contains this one. The content was already in main: without_depth_stencil_uav is used by slot 76, slot 25 cleans the description through pc_resource_desc, and the log line and the device_proxy_test case are there too; #939's two-resource path applies on top of it. Thanks to Dezmonius and 3L1A5-1 for the Windows A/B.

AI-assisted (Claude Code, Claude Opus 5.5).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7152238060 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/427#issuecomment-7152238060). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-11-25T03:47:04Z. --- Marked merged through #430, whose branch contains this one. The content was already in `main`: `without_depth_stencil_uav` is used by slot 76, slot 25 cleans the description through `pc_resource_desc`, and the log line and the `device_proxy_test` case are there too; #939's two-resource path applies on top of it. Thanks to Dezmonius and 3L1A5-1 for the Windows A/B. AI-assisted (Claude Code, Claude Opus 5.5).
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!427
No description provided.