d3d12: Xbox device slots 70/71 write buffer views from a buffer description and its address (RT-TITLE-BUFFER-VIEWS) #1160

Open
github-bot wants to merge 2 commits from github-bot/gh-1160 into main AGit
Owner

@⁠iFeyz on GitHub · 2026-11-24 19:22 UTC · original
iFeyz:feat/title-buffer-views → main · +453 −113 · 8 files · 2 commits · open

Claimed in the coordination issue as: RT-TITLE-BUFFER-VIEWS (#14)

Depends on: #1079 (this branch is built on it; its last commit is this pull request)

What and why

@⁠DadaCap measured that Xbox device slots 70 (SRV) and 71 (UAV) also make buffer views, and that the missing ones are a cause of the world-phase GPU fault: with the null descriptor, the instance-culling dispatches read leftover memory as a V# and the device is lost (issue #14, comment 7140195321). #1079 resolves the texture half of the same two slots; this is the buffer half, on top of it.

  • runtime/shims/d3d12_xs_device.cpp: a buffer description now reaches the placed-view handler too, not only TEXTURE1D..3D.
  • runtime/shims/d3d12_vulkan_device.cpp, write_placed_view: a buffer description writes the V# of a buffer view of the description's Width bytes at the address (dwords 10–11 of the view words). The address is taken as a GPU address, as CreateConstantBufferView takes BufferLocation. The V# is built by the same code as CreateShaderResourceView / CreateUnorderedAccessView for a buffer resource, factored out as write_buffer_srv_at / write_buffer_uav_at (address and size in, no resource object), so raw, structured and typed views and their bounds checks are the PC methods' and are not copied.
    • A view those refuse gives the caller's null descriptor, as before.
    • So does a UAV with a counter offset, since the slot names no counter resource.
    • The retail title's flags word (0x20004) needs no masking: only ALLOW_UNORDERED_ACCESS (0x4) is read.
  • Docs: docs/d3d12_vulkan.md, next to #1079's paragraph on slots 70/71.

Not measured here: whether the title's addresses for these buffers are ones the layer can read on every stack. They are used the way a CBV's address already is.

When stacked with DadaCap's boot-prototype (or anything that adds arena_va()): the slot's address belongs to the same family as a CBV's or a vertex view's there, so translate it with arena_va() once in write_placed_view before the two helpers are called. Taking write_buffer_srv_at whole from this PR drops that call (DesertGamer's review, which re-ran with it kept).

Retail result so far (DesertGamer, RTX 5070, with arena_va() kept): the instance-culling device loss is still there at 83.4 s, so the null buffer views were at most one of its causes.

Tested

  • d3d12_set0_compute_test (RX 9070 XT): through the real slot 70/71 entry points, with a buffer description carrying the retail flags 0x20004, six views give exactly the descriptor the PC method writes for the same buffer: typed R32_UINT, structured stride 16 and 32 (UAVs); raw, structured, typed (SRVs). Three controls give the null descriptor: past the buffer's end, a counter offset, and a UAV of a description without ALLOW_UNORDERED_ACCESS.
  • Rebased on #1079's current head (99176da10): xs_proxy_mock* (6), d3d12_set0_compute, d3d12_placed_texture_uav_off: 8 of 8 pass, xs_proxy_mock_env_slots_invalid included now that #1079 routes its example away from slot 71.
  • Runtime (Windows 11, MSVC 2022 Build Tools, RelWithDebInfo, full build): ctest 303 of 308 pass. The 5 failures fail the same way without this commit: xs_proxy_mock_env_slots_invalid on #1079's previous head (passes on the current one, above), and the 4 already on main here (d3d12_clear, d3d12_execute_indirect_validation, d3d12_texture_tiles, d3d12_pipeline_library_host, reported in #14).
  • tests/test_docs_links.py, scripts/check_no_game_data.py on every changed file.

GPUs tested: AMD Radeon RX 9070 XT, AMD Adrenalin 26.11.2 (Vulkan 1.4.359), Windows 11

AI-assisted: yes

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed.
**@⁠iFeyz** on GitHub · 2026-11-24 19:22 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1160) `iFeyz:feat/title-buffer-views` → `main` · +453 −113 · 8 files · 2 commits · open Claimed in the coordination issue as: RT-TITLE-BUFFER-VIEWS (https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14) Depends on: #1079 (this branch is built on it; its last commit is this pull request) ### What and why @⁠DadaCap measured that Xbox device slots 70 (SRV) and 71 (UAV) also make **buffer** views, and that the missing ones are a cause of the world-phase GPU fault: with the null descriptor, the instance-culling dispatches read leftover memory as a V# and the device is lost (issue #14, comment 7140195321). #1079 resolves the texture half of the same two slots; this is the buffer half, on top of it. - **`runtime/shims/d3d12_xs_device.cpp`**: a buffer description now reaches the placed-view handler too, not only `TEXTURE1D..3D`. - **`runtime/shims/d3d12_vulkan_device.cpp`**, `write_placed_view`: a buffer description writes the V# of a buffer view of the description's `Width` bytes at the address (dwords 10–11 of the view words). The address is taken as a GPU address, as `CreateConstantBufferView` takes `BufferLocation`. The V# is built by the same code as `CreateShaderResourceView` / `CreateUnorderedAccessView` for a buffer resource, factored out as `write_buffer_srv_at` / `write_buffer_uav_at` (address and size in, no resource object), so raw, structured and typed views and their bounds checks are the PC methods' and are not copied. - A view those refuse gives the caller's null descriptor, as before. - So does a UAV with a counter offset, since the slot names no counter resource. - The retail title's flags word (`0x20004`) needs no masking: only `ALLOW_UNORDERED_ACCESS` (`0x4`) is read. - **Docs**: `docs/d3d12_vulkan.md`, next to #1079's paragraph on slots 70/71. Not measured here: whether the title's addresses for these buffers are ones the layer can read on every stack. They are used the way a CBV's address already is. **When stacked with DadaCap's `boot-prototype` (or anything that adds `arena_va()`):** the slot's address belongs to the same family as a CBV's or a vertex view's there, so translate it with `arena_va()` once in `write_placed_view` before the two helpers are called. Taking `write_buffer_srv_at` whole from this PR drops that call (DesertGamer's review, which re-ran with it kept). **Retail result so far (DesertGamer, RTX 5070, with `arena_va()` kept):** the instance-culling device loss is still there at 83.4 s, so the null buffer views were at most one of its causes. ### Tested - `d3d12_set0_compute_test` (RX 9070 XT): through the real slot 70/71 entry points, with a buffer description carrying the retail flags `0x20004`, six views give exactly the descriptor the PC method writes for the same buffer: typed `R32_UINT`, structured stride 16 and 32 (UAVs); raw, structured, typed (SRVs). Three controls give the null descriptor: past the buffer's end, a counter offset, and a UAV of a description without `ALLOW_UNORDERED_ACCESS`. - Rebased on #1079's current head (`99176da10`): `xs_proxy_mock*` (6), `d3d12_set0_compute`, `d3d12_placed_texture_uav_off`: 8 of 8 pass, `xs_proxy_mock_env_slots_invalid` included now that #1079 routes its example away from slot 71. - Runtime (Windows 11, MSVC 2022 Build Tools, RelWithDebInfo, full build): `ctest` 303 of 308 pass. The 5 failures fail the same way without this commit: `xs_proxy_mock_env_slots_invalid` on #1079's previous head (passes on the current one, above), and the 4 already on `main` here (`d3d12_clear`, `d3d12_execute_indirect_validation`, `d3d12_texture_tiles`, `d3d12_pipeline_library_host`, reported in #14). - `tests/test_docs_links.py`, `scripts/check_no_game_data.py` on every changed file. GPUs tested: AMD Radeon RX 9070 XT, AMD Adrenalin 26.11.2 (Vulkan 1.4.359), Windows 11 AI-assisted: yes ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [ ] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed.
A raw shader-resource view of a live image used to return a null
descriptor. Match the placement and resource description for SRVs and
UAVs, retain the chosen image while creating its view, and remove its
entry on final release. The placement ABI is also documented by VIctory.

The default and rollback GPU tests each sampled 64 expected texels from
a placed view. The default accepted two writable views and rejected two
controls. The rollback returned four null UAVs.

xs_proxy_mock's invalid environment-slot case used slot 71 as its
forwarded PC slot. Slot 71 is routed now, so the case probes slot 72.
All six CTest forms of the proxy test pass.

AI-assisted (Codex and Claude Code agents).

Co-authored-by: Plaaasma <[email protected]>
Co-Authored-By: Claude Fable 5.2 <[email protected]>
DadaCap measured that slots 70 (SRV) and 71 (UAV) also make buffer views, and that the null descriptor
they got left the instance-culling dispatches reading leftover memory as a V# until the device was
lost (issue #14 comment 7140195321). A buffer description now reaches #1079's placed-view handler,
which writes the V# of a view of Width bytes at the address (taken as a GPU address, as a CBV's
BufferLocation is). The V# comes from the code CreateShaderResourceView / CreateUnorderedAccessView
use for a buffer resource, factored out as write_buffer_srv_at / write_buffer_uav_at, so the view
kinds and bounds are the PC methods'. A refused view or a UAV counter offset keeps the null view.
d3d12_set0_compute_test compares six views with the PC methods' and checks three null controls.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:40:53 +00:00
Author
Owner

@⁠abnalstlll-byte on GitHub · 2026-11-24 19:24 UTC · original · approved these changes

Reviewed and verified. Vital breakthrough for title instance culling and crash resolution (RT-TITLE-BUFFER-VIEWS, Issue #14). Extends Xbox device slots 70 (SRV) and 71 (UAV) to construct raw, structured, and typed buffer views from a buffer description Width and GPU address via write_buffer_srv_at / write_buffer_uav_at. Prevents device-loss crash on instance-culling dispatches. Verified in runtime/test/d3d12_set0_compute_test.cpp and xs_proxy_mock_test.cpp. 100% clean-room.

**@⁠abnalstlll-byte** on GitHub · 2026-11-24 19:24 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1160#pullrequestreview-6045865720) · **approved these changes** Reviewed and verified. Vital breakthrough for title instance culling and crash resolution (RT-TITLE-BUFFER-VIEWS, Issue #14). Extends Xbox device slots 70 (SRV) and 71 (UAV) to construct raw, structured, and typed buffer views from a buffer description Width and GPU address via write_buffer_srv_at / write_buffer_uav_at. Prevents device-loss crash on instance-culling dispatches. Verified in runtime/test/d3d12_set0_compute_test.cpp and xs_proxy_mock_test.cpp. 100% clean-room.
Author
Owner

@⁠madhyn on GitHub · 2026-11-24 19:26 UTC · original

Tested d04e78e2b on Arch Linux + Wine 11.22 + NVIDIA RTX 3060 Ti (clang-cl + xwin cross-build):

ctest --test-dir runtime/build/win -R "^(xs_proxy_mock.*|d3d12_set0_compute|d3d12_placed_texture_uav_off|d3d12_title_buffer.*)$" --output-on-failure:

  • d3d12_set0_compute: Passed (5.53 s)
  • d3d12_placed_texture_uav_off: Passed (5.57 s)
  • xs_proxy_mock, _no_reserve, _no_protect, _no_handler, _env_slots: Passed (5/5)
  • xs_proxy_mock_env_slots_invalid: Failed (5.35 s) — [rt] d3d12_xs: device slot 71 routed to placed view UAV -> xs_proxy_mock line 1073: hr_of(raw(device, 71)) == S_OK && mock->calls[71] == 1 (same slot 71 failure seen on current main)

7 passed, 1 failed (88%).

AI-assisted: yes

**@⁠madhyn** on GitHub · 2026-11-24 19:26 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1160#issuecomment-7142103122) Tested `d04e78e2b` on Arch Linux + Wine 11.22 + NVIDIA RTX 3060 Ti (clang-cl + xwin cross-build): `ctest --test-dir runtime/build/win -R "^(xs_proxy_mock.*|d3d12_set0_compute|d3d12_placed_texture_uav_off|d3d12_title_buffer.*)$" --output-on-failure`: - `d3d12_set0_compute`: **Passed** (5.53 s) - `d3d12_placed_texture_uav_off`: **Passed** (5.57 s) - `xs_proxy_mock`, `_no_reserve`, `_no_protect`, `_no_handler`, `_env_slots`: **Passed** (5/5) - `xs_proxy_mock_env_slots_invalid`: **Failed** (5.35 s) — `[rt] d3d12_xs: device slot 71 routed to placed view UAV` -> `xs_proxy_mock line 1073: hr_of(raw(device, 71)) == S_OK && mock->calls[71] == 1` (same `slot 71` failure seen on current `main`) 7 passed, 1 failed (88%). AI-assisted: yes
Author
Owner

@⁠DesertGamer on GitHub · 2026-11-24 19:27 UTC · original

measurement on the retail boot, #1160 on top of #1079 + #980 + #1028 (+ #1021 translated shaders, DadaCap prototype + #968): RTX 5070, Windows 11, NVIDIA 617.14

  • Without #1160 the run ends in a device loss at 137.7 s (last marker 164864, a skinning compute dispatch of 47x1x1 groups). With #1160 it ends at 29.0 s (last marker 42120, a postfx compute dispatch of 32x1x1 groups, the same shader class had just completed 32x1x1).
  • The driver's fault report with #1160: a read of an invalid address 0x21bcc41f000 (without it: 0x3233d5e0000, a different shader). Both look like host pointers, not console or arena addresses; I have not checked where the shaders get them.
  • My reading, not verified: a buffer view of slot 70/71 that was a null descriptor is now a real V#, and the address taken from the description is not a GPU address in this stack, so shaders that read zeros now read through it. I will log the addresses write_buffer_srv_at is given and post what they are.
  • The loss does not go away with #1160 here. The checkpoint code that names the failing command is in my PR (RT-VK-CHECKPOINTS, claimed above), so this can be reproduced on a second stack.

AI-assisted: yes (Claude Code, Sonnet 5.5)

**@⁠DesertGamer** on GitHub · 2026-11-24 19:27 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1160#issuecomment-7142115409) measurement on the retail boot, #1160 on top of #1079 + #980 + #1028 (+ #1021 translated shaders, DadaCap prototype + #968): RTX 5070, Windows 11, NVIDIA 617.14 - Without #1160 the run ends in a device loss at 137.7 s (last marker 164864, a skinning compute dispatch of 47x1x1 groups). With #1160 it ends at 29.0 s (last marker 42120, a postfx compute dispatch of 32x1x1 groups, the same shader class had just completed 32x1x1). - The driver's fault report with #1160: a read of an invalid address 0x21bcc41f000 (without it: 0x3233d5e0000, a different shader). Both look like host pointers, not console or arena addresses; I have not checked where the shaders get them. - My reading, not verified: a buffer view of slot 70/71 that was a null descriptor is now a real V#, and the address taken from the description is not a GPU address in this stack, so shaders that read zeros now read through it. I will log the addresses `write_buffer_srv_at` is given and post what they are. - The loss does not go away with #1160 here. The checkpoint code that names the failing command is in my PR (RT-VK-CHECKPOINTS, claimed above), so this can be reproduced on a second stack. AI-assisted: yes (Claude Code, Sonnet 5.5)
Author
Owner

@⁠DesertGamer on GitHub · 2026-11-24 19:29 UTC · original

correction, please disregard the measurement above as a statement about #1160: my stack was wrong, not the PR.

On my stack the buffer views go through arena_va() (a buffer's GPU address is turned into its arena address); #1160 was written on a base without that, so its factored write_buffer_srv_at writes base_va + byte_off as is. When I merged #1160 onto my stack I took its function whole and lost the arena_va() call in the three buffer cases, so the invalid addresses in the fault reports (0x21bcc41f000 here, 0x3233d5e0000 without #1160) and the earlier loss at 29 s say nothing about #1160 itself. The "reading" in my comment (a null descriptor became a real V# with a non-GPU address) was a guess made before I had looked at that line.

I am re-running with the arena_va() kept in write_buffer_srv_at and will post that result here. Whoever lands #1160 together with the change that introduced arena_va() in the buffer SRV path will hit the same textual conflict in that function, so it is worth knowing before both are merged.

AI-assisted: yes (Claude Code, Sonnet 5.5)

**@⁠DesertGamer** on GitHub · 2026-11-24 19:29 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1160#issuecomment-7142168436) correction, please disregard the measurement above as a statement about #1160: my stack was wrong, not the PR. On my stack the buffer views go through `arena_va()` (a buffer's GPU address is turned into its arena address); #1160 was written on a base without that, so its factored `write_buffer_srv_at` writes `base_va + byte_off` as is. When I merged #1160 onto my stack I took its function whole and lost the `arena_va()` call in the three buffer cases, so the invalid addresses in the fault reports (0x21bcc41f000 here, 0x3233d5e0000 without #1160) and the earlier loss at 29 s say nothing about #1160 itself. The "reading" in my comment (a null descriptor became a real V# with a non-GPU address) was a guess made before I had looked at that line. I am re-running with the `arena_va()` kept in `write_buffer_srv_at` and will post that result here. Whoever lands #1160 together with the change that introduced `arena_va()` in the buffer SRV path will hit the same textual conflict in that function, so it is worth knowing before both are merged. AI-assisted: yes (Claude Code, Sonnet 5.5)
Author
Owner

@⁠DesertGamer on GitHub · 2026-11-24 19:31 UTC · original

result with arena_va() kept in write_buffer_srv_at (the correction above), same stack as before: #1160 on #1079 + #980 + #1028, #1021 translated shaders, DadaCap prototype + #968, RTX 5070, Windows 11, NVIDIA 617.14, retail boot.

  • The device is lost at 83.4 s, last marker 153892: a dispatch of 21x1x1 groups of an instance-culling compute shader (the tree/imposter batch cull), right after a dispatch of 238x1x1 groups of the prop batch cull. That is the culling-dispatch loss you asked about: it does not go away with #1160 here.
  • Fault report: a read of an invalid address 0xf042c31e8000.
  • Without #1160 the same stack runs to 137.7 s and stops in a skinning compute dispatch instead. These are single runs; I have not measured the run-to-run spread on this stack, so I do not claim #1160 moves the stop, only that it does not remove the culling one.

The checkpoint output comes from LEONIDA_CHECKPOINTS=1 (RT-VK-CHECKPOINTS, claimed above); I can post the marker lines for the last few commands if useful.

AI-assisted: yes (Claude Code, Sonnet 5.5)

**@⁠DesertGamer** on GitHub · 2026-11-24 19:31 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1160#issuecomment-7142214894) result with `arena_va()` kept in `write_buffer_srv_at` (the correction above), same stack as before: #1160 on #1079 + #980 + #1028, #1021 translated shaders, DadaCap prototype + #968, RTX 5070, Windows 11, NVIDIA 617.14, retail boot. - The device is lost at 83.4 s, last marker 153892: a dispatch of 21x1x1 groups of an instance-culling compute shader (the tree/imposter batch cull), right after a dispatch of 238x1x1 groups of the prop batch cull. That is the culling-dispatch loss you asked about: it does not go away with #1160 here. - Fault report: a read of an invalid address 0xf042c31e8000. - Without #1160 the same stack runs to 137.7 s and stops in a skinning compute dispatch instead. These are single runs; I have not measured the run-to-run spread on this stack, so I do not claim #1160 moves the stop, only that it does not remove the culling one. The checkpoint output comes from `LEONIDA_CHECKPOINTS=1` (RT-VK-CHECKPOINTS, claimed above); I can post the marker lines for the last few commands if useful. AI-assisted: yes (Claude Code, Sonnet 5.5)
Author
Owner

@⁠madhyn on GitHub · 2026-11-24 19:41 UTC · original

Also tested d04e78e2b (which carries #1079) stacked with #1028 (RT-DEVICE-FAULT-INFO) and #974 (00fc23b9a) on origin/main (6293c1c4f, Arch Linux + Wine 11.22 + NVIDIA RTX 3060 Ti, retail 1.0.2.1):

  • device slot 70 is hit and routed to placed view SRV (args 0xbb8764f810 0xbb8764f7d0 0xbbb4fe0220 0x0 0x0).
  • 0 VK_ERROR_DEVICE_LOST / VK_EXT_device_fault lines.
  • On this clean main base (without our separate exp/stack-385 frame-loop stack), the boot stops earlier at 0x14247af2d: int3 right after device slot 127 (dimension=3) and device slot 20.

AI-assisted: yes

**@⁠madhyn** on GitHub · 2026-11-24 19:41 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1160#issuecomment-7142447235) Also tested `d04e78e2b` (which carries #1079) stacked with #1028 (`RT-DEVICE-FAULT-INFO`) and #974 (`00fc23b9a`) on `origin/main` (`6293c1c4f`, Arch Linux + Wine 11.22 + NVIDIA RTX 3060 Ti, retail 1.0.2.1): - `device slot 70` is hit and routed to `placed view SRV` (`args 0xbb8764f810 0xbb8764f7d0 0xbbb4fe0220 0x0 0x0`). - **0** `VK_ERROR_DEVICE_LOST` / `VK_EXT_device_fault` lines. - On this clean `main` base (without our separate `exp/stack-385` frame-loop stack), the boot stops earlier at `0x14247af2d: int3` right after `device slot 127` (`dimension=3`) and `device slot 20`. AI-assisted: yes
Author
Owner

@⁠iFeyz on GitHub · 2026-11-24 19:42 UTC · original

@⁠madhyn @⁠DesertGamer thank you both, that is exactly the check this needed.

arena_va(): it exists on DadaCap's boot-prototype (d3d12_com.h, used for root views and vertex/index views there), not on main. This pull request is written against main, where a constant-buffer view's BufferLocation is used as is, so write_buffer_srv_at / write_buffer_uav_at take the slot's address the same way. On a stack that has arena_va(), the slot's address belongs to the same family as a CBV's or a vertex view's. Translating it once in write_placed_view before the two calls (or inside both helpers, as DesertGamer did) is the right merge. I will say so in the description so whoever stacks the two does not lose it.

The culling loss: DesertGamer's run says #1160 alone does not remove it on that stack (lost at 83.4 s in an instance-culling dispatch, read of 0xf042c31e8000). So the null buffer views were at most one cause. That address does not look like an arena address. Whether it comes from a buffer view these slots write or from somewhere else is what the checkpoint markers (RT-VK-CHECKPOINTS) could show. If you post the last markers' bindings, I can check them against what #1160 writes.

**@⁠iFeyz** on GitHub · 2026-11-24 19:42 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1160#issuecomment-7142476354) @⁠madhyn @⁠DesertGamer thank you both, that is exactly the check this needed. **`arena_va()`:** it exists on DadaCap's `boot-prototype` (`d3d12_com.h`, used for root views and vertex/index views there), not on `main`. This pull request is written against `main`, where a constant-buffer view's `BufferLocation` is used as is, so `write_buffer_srv_at` / `write_buffer_uav_at` take the slot's address the same way. On a stack that has `arena_va()`, the slot's address belongs to the same family as a CBV's or a vertex view's. Translating it once in `write_placed_view` before the two calls (or inside both helpers, as DesertGamer did) is the right merge. I will say so in the description so whoever stacks the two does not lose it. **The culling loss:** DesertGamer's run says #1160 alone does not remove it on that stack (lost at 83.4 s in an instance-culling dispatch, read of `0xf042c31e8000`). So the null buffer views were at most one cause. That address does not look like an arena address. Whether it comes from a buffer view these slots write or from somewhere else is what the checkpoint markers (RT-VK-CHECKPOINTS) could show. If you post the last markers' bindings, I can check them against what #1160 writes.
Author
Owner

@⁠Deedlyy on GitHub · 2026-11-24 20:11 UTC · original

Recommendation: [WAIT]

Reasoning: Xbox device slots 70/71 now write buffer SRV/UAV views from a buffer description and address. This targets a world-phase device-loss cause, a significant runtime change (+453/-113). The branch is built on #1079, which must land first. The retail-boot measurements from DesertGamer and madhyn depend on DadaCap's out-of-tree arena_va() stack, which isn't on main. Merge after #1079, once someone shows the device-loss improvement on main's own address path. CI (label, change-scope, no-game-data and the Runtime jobs) is still queued awaiting maintainer workflow approval, so nothing has run in CI yet; GitHub reports no merge conflict with main.

Impact level: 7/10

**@⁠Deedlyy** on GitHub · 2026-11-24 20:11 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1160#issuecomment-7143178457) **Recommendation:** [WAIT] **Reasoning:** Xbox device slots 70/71 now write buffer SRV/UAV views from a buffer description and address. This targets a world-phase device-loss cause, a significant runtime change (+453/-113). The branch is built on #1079, which must land first. The retail-boot measurements from DesertGamer and madhyn depend on DadaCap's out-of-tree `arena_va()` stack, which isn't on main. Merge after #1079, once someone shows the device-loss improvement on main's own address path. CI (label, change-scope, no-game-data and the Runtime jobs) is still queued awaiting maintainer workflow approval, so nothing has run in CI yet; GitHub reports no merge conflict with `main`. **Impact level:** 7/10
Author
Owner

@⁠azsekazvamdimitar on GitHub · 2026-11-24 23:41 UTC · original

Ran this on Linux under Wine and Proton, as part of VERIFY-WINE-PROTON-GPU in #14. Your branch at c4afec17e as is, against its base #1079 at 99176da10: both now conflict with main (d3d12_xs_device.h/.cpp slot 70/74, xs_proxy_mock_test.cpp main), so I did not merge into main.

tests #1079 this PR #1079 + only this PR's tests
d3d12_set0_compute pass pass fail: line 159: expected != Words{} && got == expected, line 176: same(uav, true) == 0, line 325: check_placed_buffer_views(device.p) == 0
d3d12_placed_texture_uav_off pass pass fail: the same three lines
xs_proxy_mock and its five variants pass pass pass

The same results on each host: WineHQ 11.22 (winewayland) and GE-Proton11-14 (winex11, with d3d12, d3d12core and dxgi set to native) on an RTX 3090 (NVIDIA 590.48.01), and GE-Proton on the Radeon iGPU of a Ryzen 5 7600 (RADV, Mesa 26.0.8) for the two d3d12_set0_compute registrations. So the new buffer-view checks fail without your change and pass with it.

These tests are Windows-only, so nothing ran natively. Built with clang-cl and xwin in a container; not run on Windows or with the retail game. It will need a rebase onto main after #1079's.

AI-assisted (Claude).

**@⁠azsekazvamdimitar** on GitHub · 2026-11-24 23:41 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1160#issuecomment-7147679943) Ran this on Linux under Wine and Proton, as part of VERIFY-WINE-PROTON-GPU in #14. Your branch at c4afec17e as is, against its base #1079 at 99176da10: both now conflict with main (`d3d12_xs_device.h/.cpp` slot 70/74, `xs_proxy_mock_test.cpp` main), so I did not merge into main. | tests | #1079 | this PR | #1079 + only this PR's tests | | --- | --- | --- | --- | | `d3d12_set0_compute` | pass | pass | fail: `line 159: expected != Words{} && got == expected`, `line 176: same(uav, true) == 0`, `line 325: check_placed_buffer_views(device.p) == 0` | | `d3d12_placed_texture_uav_off` | pass | pass | fail: the same three lines | | `xs_proxy_mock` and its five variants | pass | pass | pass | The same results on each host: WineHQ 11.22 (winewayland) and GE-Proton11-14 (winex11, with `d3d12`, `d3d12core` and `dxgi` set to native) on an RTX 3090 (NVIDIA 590.48.01), and GE-Proton on the Radeon iGPU of a Ryzen 5 7600 (RADV, Mesa 26.0.8) for the two `d3d12_set0_compute` registrations. So the new buffer-view checks fail without your change and pass with it. These tests are Windows-only, so nothing ran natively. Built with clang-cl and xwin in a container; not run on Windows or with the retail game. It will need a rebase onto main after #1079's. AI-assisted (Claude).
This pull request has changes conflicting with the target branch.
  • runtime/CMakeLists.txt
  • runtime/shims/d3d12_com_object.h
  • runtime/shims/d3d12_vulkan_device.cpp
  • runtime/shims/d3d12_xs_device.cpp
  • runtime/shims/d3d12_xs_device.h
  • runtime/test/xs_proxy_mock_test.cpp
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1160/head:github-bot/gh-1160'
git switch 'github-bot/gh-1160'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1160'
git switch 'github-bot/gh-1160'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1160'
git switch 'github-bot/gh-1160'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1160'
git switch 'main'
git merge --squash 'github-bot/gh-1160'
git switch 'main'
git merge --ff-only 'github-bot/gh-1160'
git switch 'main'
git merge 'github-bot/gh-1160'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.