d3d12: an enhanced texture barrier into LAYOUT_UNDEFINED closes and keeps the layout (D3D-BARRIER-INTO-UNDEFINED) #1055

Manually merged
github merged 3 commits from gh-pr/1055/head into gh-pr/1055/base 2026-11-26 09:35:39 +00:00
Owner

@⁠milk4sale on GitHub · 2026-11-24 17:23 UTC · original
milk4sale:d3d12/barrier-into-undefined → main · +446 −17 · 8 files · 3 commits · merged 2026-11-24 23:24 UTC

Claimed in the coordination issue as: D3D-BARRIER-INTO-UNDEFINED (claim)

What and why

On main, CommandList::barrier(const TextureBarrier&) refuses an enhanced texture barrier whose LayoutAfter is D3D12_BARRIER_LAYOUT_UNDEFINED when LayoutBefore is a defined layout, so the list's Close returns E_INVALIDARG. D3D12 allows that barrier: it says the contents are no longer needed, as before the memory is aliased. #984 measured that WARP closes such a list (Windows 11 26340) and reports that the retail title ends a depth buffer's use this way and takes the failed Close as fatal.

This is the barrier half of item 2 of the split @⁠Moriz82 proposes in #984 ("How this can land"), carried onto current main with Moriz82 as co-author of the commit:

  • Record: the rule goes (runtime/src/command_list.h).
  • Replay: Vulkan has no transition into UNDEFINED (VUID-VkImageMemoryBarrier2-newLayout-01198). Each piece of the range gets a barrier with oldLayout = newLayout, the layout the tracker has for it, which orders the accesses and changes nothing in the image. The tracker keeps those layouts. A piece that was never used gets no barrier and is not zero-filled for it. The next barrier on those subresources starts from UNDEFINED and discards, as before (emit in runtime/src/vulkan_replay.h).
  • Docs: the rule and how it was checked are in docs/d3d12_vulkan.md section 4.3, and the close-parity counts in section 3.2 are 116 cases, 85 matching.

What differs from the code in #984:

  • Only a defined LayoutBefore is treated as a release. UNDEFINED to UNDEFINED behaves as it does on main today and stays with #600 (VK-TEXTURE-BARRIER-UNDEF-NOOP). This branch merges cleanly with #600's head, and on the merged tree replay_texture_barrier_test, command_list_test, #600's vk_texture_barrier_undef_noop_test and vk_command_replay_test (under validation) pass.
  • A release that also carries the discard flag keeps the layouts too, instead of recording nothing.
  • More cases in replay_texture_barrier_test, and two GPU tests (below).

The bindless flush of the same item in #984 is not part of this.

Tested

On main 32950551e plus this commit, RTX 4070 Ti:

Test Result with the change Without it
command_list_test (CPU) passes, natively and under Wine fails at the new check: the barrier is refused
replay_texture_barrier_test (CPU): mips in two layouts each keep theirs, also with the discard flag and without a tracker; an unused image is released with no barrier and no zero-fill; the barrier from UNDEFINED that follows passes, natively and under Wine with only the replay half reverted: 17 failed checks, exit 1
d3d12_close_parity_test, three new enhanced-barrier rows 116 cases, 85 match the measured WARP column, 16 known layer-stricter, 15 known layer-looser, 0 failures (under Wine there is no WARP, so the layer is compared with the measured column) 2 failures: the two rows into UNDEFINED close with 0x80070057
vk_command_replay_test part K (GPU, native): a colour target, a depth buffer whose two planes are in different layouts and an unused image are released; the target is taken from UNDEFINED again, cleared and read back 16 texels exact, no validation errors with VK_LAYER_KHRONOS_validation 1.4.363 with only the replay half reverted: VUID-VkImageMemoryBarrier2-newLayout-01198 four times, part K fails
d3d12_com_test (GPU, D3D12 list and queue, under Wine): a depth buffer is cleared, released, taken from UNDEFINED again, cleared and read back passes, 16 depth and 16 stencil texels exact fails at list->Close() == S_OK

The five tests in the table were run again after the rebase onto 32950551e. The "without it" column and the three runs below are from the same commit on its first base, main 82a2aabcc; the eleven commits in between touch none of these files (shader fixtures, translator tests and four lines of runtime/CMakeLists.txt).

Also run:

  • The native suite on the RTX 4070 Ti: 74 tests, 72 pass and 2 skip (shader_library_corpus and vk_sync_validation).
  • The whole Windows tree cross-builds (clang-cl 23.1.4, xwin SDK 10.0.26100). Under wine-staging 11.21, 32 tests around this code (d3d12_com, d3d12_vulkan_device, d3d12_close_parity, the three d3d12_queue_handover*, d3d12_m2_*, d3d12_m3_*, d3d12_m4_compute, d3d12_draw, the depth, placed, clear and copy tests, the ten replay_* tests, vk_command_replay and command_list): 28 pass, 2 skip, 2 fail. The two that fail, d3d12_clear and d3d12_clear_formats, compare the layer with Wine's own D3D12 and fail the same way without this change: 20 and 99 differing lines, identical line for line on main 82a2aabcc and on this branch.
  • d3d12_com_test and vk_command_replay_test under Wine with the validation layer inserted on the Linux side: the only error is VUID-vkCreateDevice-ppEnabledExtensionNames-01387, which Wine's device creation gives on main too.
  • The tests/test_docs_*.py checks, python -I scripts/check_no_game_data.py on the eight files, and git diff --check.

Not run: Windows itself and MSVC, which I do not have, so no live WARP; the WARP column of the three new rows is #984's measurement on Windows 11 26340 (the test's header names the build the other rows were measured on). The retail title was not booted with this change: that it issues this barrier is #984's report, not something measured here. No AMD or Intel GPU. The rest of the Wine suite was not run.

GPUs tested: NVIDIA GeForce RTX 4070 Ti, driver 620.70.06, Linux (CachyOS): natively, and through wine-staging 11.21

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.

🤖 Generated with Claude Code

**@⁠milk4sale** on GitHub · 2026-11-24 17:23 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1055) `milk4sale:d3d12/barrier-into-undefined` → `main` · +446 −17 · 8 files · 3 commits · merged 2026-11-24 23:24 UTC Claimed in the coordination issue as: D3D-BARRIER-INTO-UNDEFINED ([claim](https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14)) ### What and why On `main`, `CommandList::barrier(const TextureBarrier&)` refuses an enhanced texture barrier whose `LayoutAfter` is `D3D12_BARRIER_LAYOUT_UNDEFINED` when `LayoutBefore` is a defined layout, so the list's `Close` returns `E_INVALIDARG`. D3D12 allows that barrier: it says the contents are no longer needed, as before the memory is aliased. #984 measured that WARP closes such a list (Windows 11 26340) and reports that the retail title ends a depth buffer's use this way and takes the failed `Close` as fatal. This is the barrier half of item 2 of the split @⁠Moriz82 proposes in #984 ("How this can land"), carried onto current `main` with Moriz82 as co-author of the commit: - **Record:** the rule goes (`runtime/src/command_list.h`). - **Replay:** Vulkan has no transition into `UNDEFINED` (VUID-VkImageMemoryBarrier2-newLayout-01198). Each piece of the range gets a barrier with `oldLayout = newLayout`, the layout the tracker has for it, which orders the accesses and changes nothing in the image. The tracker keeps those layouts. A piece that was never used gets no barrier and is not zero-filled for it. The next barrier on those subresources starts from `UNDEFINED` and discards, as before (`emit` in `runtime/src/vulkan_replay.h`). - **Docs:** the rule and how it was checked are in `docs/d3d12_vulkan.md` section 4.3, and the close-parity counts in section 3.2 are 116 cases, 85 matching. What differs from the code in #984: - Only a defined `LayoutBefore` is treated as a release. `UNDEFINED` to `UNDEFINED` behaves as it does on `main` today and stays with #600 (VK-TEXTURE-BARRIER-UNDEF-NOOP). This branch merges cleanly with #600's head, and on the merged tree `replay_texture_barrier_test`, `command_list_test`, #600's `vk_texture_barrier_undef_noop_test` and `vk_command_replay_test` (under validation) pass. - A release that also carries the discard flag keeps the layouts too, instead of recording nothing. - More cases in `replay_texture_barrier_test`, and two GPU tests (below). The bindless flush of the same item in #984 is not part of this. ### Tested On `main` 32950551e plus this commit, RTX 4070 Ti: | Test | Result with the change | Without it | |---|---|---| | `command_list_test` (CPU) | passes, natively and under Wine | fails at the new check: the barrier is refused | | `replay_texture_barrier_test` (CPU): mips in two layouts each keep theirs, also with the discard flag and without a tracker; an unused image is released with no barrier and no zero-fill; the barrier from `UNDEFINED` that follows | passes, natively and under Wine | with only the replay half reverted: 17 failed checks, exit 1 | | `d3d12_close_parity_test`, three new enhanced-barrier rows | 116 cases, 85 match the measured WARP column, 16 known layer-stricter, 15 known layer-looser, 0 failures (under Wine there is no WARP, so the layer is compared with the measured column) | 2 failures: the two rows into `UNDEFINED` close with `0x80070057` | | `vk_command_replay_test` part K (GPU, native): a colour target, a depth buffer whose two planes are in different layouts and an unused image are released; the target is taken from `UNDEFINED` again, cleared and read back | 16 texels exact, **no validation errors** with VK_LAYER_KHRONOS_validation 1.4.363 | with only the replay half reverted: VUID-VkImageMemoryBarrier2-newLayout-01198 four times, part K fails | | `d3d12_com_test` (GPU, D3D12 list and queue, under Wine): a depth buffer is cleared, released, taken from `UNDEFINED` again, cleared and read back | passes, 16 depth and 16 stencil texels exact | fails at `list->Close() == S_OK` | The five tests in the table were run again after the rebase onto 32950551e. The "without it" column and the three runs below are from the same commit on its first base, `main` 82a2aabcc; the eleven commits in between touch none of these files (shader fixtures, translator tests and four lines of `runtime/CMakeLists.txt`). Also run: - The native suite on the RTX 4070 Ti: 74 tests, 72 pass and 2 skip (`shader_library_corpus` and `vk_sync_validation`). - The whole Windows tree cross-builds (clang-cl 23.1.4, xwin SDK 10.0.26100). Under wine-staging 11.21, 32 tests around this code (`d3d12_com`, `d3d12_vulkan_device`, `d3d12_close_parity`, the three `d3d12_queue_handover*`, `d3d12_m2_*`, `d3d12_m3_*`, `d3d12_m4_compute`, `d3d12_draw`, the depth, placed, clear and copy tests, the ten `replay_*` tests, `vk_command_replay` and `command_list`): 28 pass, 2 skip, 2 fail. The two that fail, `d3d12_clear` and `d3d12_clear_formats`, compare the layer with Wine's own D3D12 and fail the same way without this change: 20 and 99 differing lines, identical line for line on `main` 82a2aabcc and on this branch. - `d3d12_com_test` and `vk_command_replay_test` under Wine with the validation layer inserted on the Linux side: the only error is VUID-vkCreateDevice-ppEnabledExtensionNames-01387, which Wine's device creation gives on `main` too. - The `tests/test_docs_*.py` checks, `python -I scripts/check_no_game_data.py` on the eight files, and `git diff --check`. Not run: Windows itself and MSVC, which I do not have, so no live WARP; the WARP column of the three new rows is #984's measurement on Windows 11 26340 (the test's header names the build the other rows were measured on). The retail title was not booted with this change: that it issues this barrier is #984's report, not something measured here. No AMD or Intel GPU. The rest of the Wine suite was not run. GPUs tested: NVIDIA GeForce RTX 4070 Ti, driver 620.70.06, Linux (CachyOS): natively, and through wine-staging 11.21 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. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
CommandList::barrier(TextureBarrier) refused LayoutAfter = UNDEFINED from a
defined layout, so the list's Close failed. D3D12 allows it: the contents are
no longer needed, as before the memory is aliased. WARP closes such a list
(measured on Windows 11 26340 in #984), and #984 reports that the retail title
ends a depth buffer's use this way and takes the failed Close as fatal.

The rule goes. Vulkan has no transition into UNDEFINED
(VUID-VkImageMemoryBarrier2-newLayout-01198), so replay gives each piece a
barrier with oldLayout = newLayout, the layout the tracker has for it, which
orders the accesses and changes nothing in the image; the tracker keeps the
layouts. A piece that was never used gets no barrier and is not zero-filled
for it. The next barrier starts from UNDEFINED and discards, as before.

UNDEFINED -> UNDEFINED is not touched here: that is #600.

The barrier half of item 2 of the split proposed in #984, carried onto main
from Moriz82's integration branch (command_list.h, the emit change and the
command_list_test, replay_texture_barrier_test and d3d12_close_parity_test
cases), restricted to a defined LayoutBefore, with more cases and two GPU
tests added.

Tests:
- command_list_test, replay_texture_barrier_test (CPU): the recorded barrier;
  kept layouts over mips in two layouts, with the discard flag and without a
  tracker; an unused image released without a barrier or a zero-fill; the
  barrier from UNDEFINED that follows.
- d3d12_close_parity_test: three enhanced-barrier rows (116 cases, 85 match).
- vk_command_replay_test part K (GPU): a colour target, a depth buffer whose
  planes are in two layouts and an unused image released; the target used
  again and read back.
- d3d12_com_test (GPU, D3D12 list and queue): a depth buffer cleared,
  released, taken from UNDEFINED again, cleared and read back.

Co-authored-by: Moriz82 <[email protected]>
Co-Authored-By: Claude Fable 5.2 <[email protected]>
main gained its own Part K in vk_command_replay_test and a sentence in the
same bullet of docs/d3d12_vulkan.md (D3D-838, pull request 751). Both stay as
they are on main; this branch's release test becomes Part L, and the doc
bullet for LayoutAfter = UNDEFINED names it so.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Brings the branch up to date with main 68d1331e5. No conflicts; the merged tree was tested before the push (every standalone
test file under tests/ passes except tests/test_ci_registration.py, which fails on main alone since #930).

Co-Authored-By: Claude Fable 5.2 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:35:37 +00:00
github manually merged commit 59dcc9e917 into gh-pr/1055/base 2026-11-26 09:35:39 +00:00
Author
Owner

@⁠moffington on GitHub · 2026-11-24 17:44 UTC · original

Reviewed 37c5af12a on Linux with an RTX 3060 (615.78.08) and Vulkan validation enabled.

  • command_list, replay_texture_barrier, and vk_command_replay all passed with zero validation errors.
  • Windows cross-build tests also passed under Wine 11.20.
  • Additional tests covering mixed initialized/uninitialized subresource releases and release/reuse of individual array layers passed. Untouched subresource contents were preserved.
  • The additional test failed as expected on the exact base revision.

No correctness issues found in the release/discard or layout-tracking paths. Also checked merge compatibility with #600; no conflicts.

Wine close-parity testing used recorded WARP expectations rather than native WARP execution.

**@⁠moffington** on GitHub · 2026-11-24 17:44 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1055#issuecomment-7139648889) Reviewed `37c5af12a` on Linux with an RTX 3060 (615.78.08) and Vulkan validation enabled. - `command_list`, `replay_texture_barrier`, and `vk_command_replay` all passed with zero validation errors. - Windows cross-build tests also passed under Wine 11.20. - Additional tests covering mixed initialized/uninitialized subresource releases and release/reuse of individual array layers passed. Untouched subresource contents were preserved. - The additional test failed as expected on the exact base revision. No correctness issues found in the release/discard or layout-tracking paths. Also checked merge compatibility with #600; no conflicts. Wine close-parity testing used recorded WARP expectations rather than native WARP execution.
Author
Owner

@⁠Luna-OS on GitHub · 2026-11-24 19:04 UTC · original

Independent Windows verification of 37c5af12a (merge base 3295055).

Host: Windows 11 Pro 26300, NVIDIA GeForce RTX 5070 Ti (driver 621.24, Resizable BAR), live WARP, MSVC 19.44.35207 (VS 2022 Build Tools), Ninja, RelWithDebInfo, LEONIDA_VULKAN_HEADERS_FETCH=ON, LEONIDA_SDL3_FETCH=ON. Two full runs per head: without glslang (272 tests), and with glslang (KhronosGroup main-tot) so d3d12_compute, d3d12_draw and d3d12_mesh are built too (298 tests). No game files. AI-assisted (Claude Code).

base this PR
build OK OK
ctest (no glslang) 271/272 271/272
ctest (glslang) 296/298 296/298
changed tests replay_texture_barrier, vk_command_replay, d3d12_com, d3d12_close_parity, command_list Passed Passed

Failures shared with the merge base 3295055 and not caused by this PR: d3d12_execute_indirect_validation (the five rows of #504), and with glslang d3d12_draw SEGFAULTs on the base too (slot-14 false positive, claimed as D3D-SLOT14-TAIL-NULL-PAGE, PR follows).

**@⁠Luna-OS** on GitHub · 2026-11-24 19:04 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1055#issuecomment-7141554950) Independent Windows verification of `37c5af12a` (merge base `3295055`). **Host:** Windows 11 Pro 26300, NVIDIA GeForce RTX 5070 Ti (driver 621.24, Resizable BAR), live WARP, MSVC 19.44.35207 (VS 2022 Build Tools), Ninja, RelWithDebInfo, `LEONIDA_VULKAN_HEADERS_FETCH=ON`, `LEONIDA_SDL3_FETCH=ON`. Two full runs per head: without glslang (272 tests), and with glslang (KhronosGroup `main-tot`) so `d3d12_compute`, `d3d12_draw` and `d3d12_mesh` are built too (298 tests). No game files. AI-assisted (Claude Code). | | base | this PR | |---|---|---| | build | OK | OK | | ctest (no glslang) | 271/272 | 271/272 | | ctest (glslang) | 296/298 | 296/298 | | changed tests `replay_texture_barrier`, `vk_command_replay`, `d3d12_com`, `d3d12_close_parity`, `command_list` | Passed | **Passed** | Failures shared with the merge base `3295055` and not caused by this PR: `d3d12_execute_indirect_validation` (the five rows of #504), and with glslang `d3d12_draw` SEGFAULTs on the base too (slot-14 false positive, claimed as D3D-SLOT14-TAIL-NULL-PAGE, PR follows).
Author
Owner

@⁠milk4sale on GitHub · 2026-11-24 19:09 UTC · original

Merged main (6293c1c4f) into the branch as 8c1b8da15. The reviewed commit 37c5af12a is still in it: no force-push.

It conflicted with #751, which merged since: #751 added its own Part K to vk_command_replay_test and a sentence to the same bullet of docs/d3d12_vulkan.md section 4.3. Both stay as they are on main. This pull request's release test is now Part L, and its doc bullet says so.

Nothing else of the change moved. Compared with 37c5af12a, the change to runtime/src/command_list.h, runtime/src/vulkan_replay.h and the other four tests is line for line the same; vk_command_replay_test.cpp and the doc differ only by K -> L.

Rerun on the merged tree (RTX 4070 Ti, NVIDIA 620.70.06, Linux): the three native tests with the validation layer 1.4.363 (parts K and L both pass, no validation error), and the five tests under wine-staging 11.21 (d3d12_close_parity still 116 cases, 85 matching). It merges cleanly with #600, #1062, #1099 and #1100. AI-assisted (Claude Code).

**@⁠milk4sale** on GitHub · 2026-11-24 19:09 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1055#issuecomment-7141679991) Merged `main` (`6293c1c4f`) into the branch as `8c1b8da15`. The reviewed commit `37c5af12a` is still in it: no force-push. It conflicted with #751, which merged since: #751 added its own Part K to `vk_command_replay_test` and a sentence to the same bullet of `docs/d3d12_vulkan.md` section 4.3. Both stay as they are on `main`. This pull request's release test is now Part L, and its doc bullet says so. Nothing else of the change moved. Compared with `37c5af12a`, the change to `runtime/src/command_list.h`, `runtime/src/vulkan_replay.h` and the other four tests is line for line the same; `vk_command_replay_test.cpp` and the doc differ only by K -> L. Rerun on the merged tree (RTX 4070 Ti, NVIDIA 620.70.06, Linux): the three native tests with the validation layer 1.4.363 (parts K and L both pass, no validation error), and the five tests under wine-staging 11.21 (`d3d12_close_parity` still 116 cases, 85 matching). It merges cleanly with #600, #1062, #1099 and #1100. AI-assisted (Claude Code).
Author
Owner

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

AMD run (the "No AMD or Intel GPU" gap): RX 9070 XT (RDNA4, GFX1201), AMD proprietary Windows driver 26.11.2 (Vulkan 1.4.359), Windows 11, MSVC 2022 RelWithDebInfo. Head 8c1b8da15, the five tests this pull request touches built from it:

  • command_list, vk_command_replay, d3d12_com, d3d12_close_parity, replay_texture_barrier: 5 of 5 pass, no build warning or error in the touched files.
**@⁠iFeyz** on GitHub · 2026-11-24 19:42 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1055#issuecomment-7142475373) AMD run (the "No AMD or Intel GPU" gap): RX 9070 XT (RDNA4, GFX1201), AMD proprietary Windows driver 26.11.2 (Vulkan 1.4.359), Windows 11, MSVC 2022 RelWithDebInfo. Head `8c1b8da15`, the five tests this pull request touches built from it: - `command_list`, `vk_command_replay`, `d3d12_com`, `d3d12_close_parity`, `replay_texture_barrier`: **5 of 5 pass**, no build warning or error in the touched files.
Author
Owner

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

Checked on Linux with Wine and Proton (VERIFY-WINE-PROTON-GPU in #14). AI-assisted; no game files, not run on Windows or the retail package.

Setup: RTX 3090 (NVIDIA 590.48.01) and the Radeon iGPU of a Ryzen 5 7600 (RADV, Mesa 26.0.8). Native build with clang 21; Windows build with clang-cl 21 and xwin, run under WineHQ 11.22 (winewayland) and GE-Proton11-14 (winex11, d3d12=n;d3d12core=n;dxgi=n). Base: main at 58be9cdf8.

Tree native (3090, RADV) WineHQ 11.22 GE-Proton (3090, Radeon)
main 3/3 pass 5/5 pass 5/5 pass
main + this PR 3/3 pass 5/5 pass 5/5 pass
main + only this PR's runtime/test (3090 only) 0/3 0/5 0/5

Tests: command_list, vk_command_replay, replay_texture_barrier (native and Windows), d3d12_com, d3d12_close_parity (Windows only).

The last row shows the new checks catch the bug on main's code: record/prepare a barrier into UNDEFINED fail, d3d12_close_parity reports layer Close 0x80070057, WARP succeeds for COMMON -> UNDEFINED and DEPTH_STENCIL_WRITE -> UNDEFINED, and replay_texture_barrier segfaults natively (times out under WineHQ) instead of failing a check. The WARP side there is the host's d3d12 (vkd3d under Wine, vkd3d-proton under Proton), not Microsoft's WARP.

**@⁠azsekazvamdimitar** on GitHub · 2026-11-24 20:29 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1055#issuecomment-7143634570) Checked on Linux with Wine and Proton (VERIFY-WINE-PROTON-GPU in #14). AI-assisted; no game files, not run on Windows or the retail package. Setup: RTX 3090 (NVIDIA 590.48.01) and the Radeon iGPU of a Ryzen 5 7600 (RADV, Mesa 26.0.8). Native build with clang 21; Windows build with clang-cl 21 and xwin, run under WineHQ 11.22 (winewayland) and GE-Proton11-14 (winex11, `d3d12=n;d3d12core=n;dxgi=n`). Base: main at 58be9cdf8. | Tree | native (3090, RADV) | WineHQ 11.22 | GE-Proton (3090, Radeon) | | --- | --- | --- | --- | | main | 3/3 pass | 5/5 pass | 5/5 pass | | main + this PR | 3/3 pass | 5/5 pass | 5/5 pass | | main + only this PR's `runtime/test` (3090 only) | 0/3 | 0/5 | 0/5 | Tests: `command_list`, `vk_command_replay`, `replay_texture_barrier` (native and Windows), `d3d12_com`, `d3d12_close_parity` (Windows only). The last row shows the new checks catch the bug on main's code: `record/prepare a barrier into UNDEFINED` fail, `d3d12_close_parity` reports `layer Close 0x80070057, WARP succeeds` for COMMON -> UNDEFINED and DEPTH_STENCIL_WRITE -> UNDEFINED, and `replay_texture_barrier` segfaults natively (times out under WineHQ) instead of failing a check. The WARP side there is the host's d3d12 (vkd3d under Wine, vkd3d-proton under Proton), not Microsoft's WARP.
Author
Owner

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

Merged. Thanks, and thanks to Moriz82 for the split and to everyone who ran it.

  • Claim: valid. D3D-BARRIER-INTO-UNDEFINED was posted at 16:46 UTC, before this PR, and is unedited. #600 covers the separate UNDEFINED → UNDEFINED case and still merges cleanly next to this.
  • The change is sound: the record no longer refuses LayoutAfter = UNDEFINED from a defined layout, and the replay gives each piece oldLayout == newLayout from the tracker, so nothing is discarded or zero-filled and the tracker keeps its layout. The next barrier from UNDEFINED discards as before. WARP closes such a list, and the three new d3d12_close_parity rows match.
  • Linux portable ctest: 75 of 75 on main and with this PR. On main's code the new checks in command_list and vk_command_replay fail and replay_texture_barrier crashes, so they do catch the bug.
  • Windows suite under Wine (clang-cl; llvmpipe and an RDNA2 iGPU, RADV), main 16ff59721 + this PR against that main: no test changed state on either device (259 pass and 15 fail on llvmpipe, 255 and 21 on the iGPU, on both sides). d3d12_close_parity, d3d12_com, replay_texture_barrier, vk_command_replay and command_list pass on both.
  • On today's main 79d044e54 + 59dcc9e91: it merges cleanly; the 13 docs and writer tests pass; check_no_game_data.py is clean on the 8 changed files. The merges into main since that suite run are Python and shader-fixture changes only.
  • Not measured here: live WARP for the three new rows (Luna-OS ran live WARP on an earlier head) and the retail title issuing this barrier (#984's report).
  • CI had not finished on this head. The needs rebase label was out of date.

A small follow-up, not blocking: on main's code replay_texture_barrier crashes instead of failing a check; an early return after the failed record would make that failure easier to read.

AI-assisted (Claude Code, Claude Fable 5.2 and Claude Opus 5.5).

**@⁠aslan2142** on GitHub · 2026-11-24 23:24 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1055#issuecomment-7147366141) Merged. Thanks, and thanks to Moriz82 for the split and to everyone who ran it. - **Claim:** valid. `D3D-BARRIER-INTO-UNDEFINED` was posted at 16:46 UTC, before this PR, and is unedited. #600 covers the separate UNDEFINED → UNDEFINED case and still merges cleanly next to this. - **The change is sound:** the record no longer refuses `LayoutAfter = UNDEFINED` from a defined layout, and the replay gives each piece `oldLayout == newLayout` from the tracker, so nothing is discarded or zero-filled and the tracker keeps its layout. The next barrier from UNDEFINED discards as before. WARP closes such a list, and the three new `d3d12_close_parity` rows match. - **Linux portable `ctest`:** 75 of 75 on `main` and with this PR. On `main`'s code the new checks in `command_list` and `vk_command_replay` fail and `replay_texture_barrier` crashes, so they do catch the bug. - **Windows suite under Wine** (clang-cl; llvmpipe and an RDNA2 iGPU, RADV), `main` `16ff59721` + this PR against that `main`: no test changed state on either device (259 pass and 15 fail on llvmpipe, 255 and 21 on the iGPU, on both sides). `d3d12_close_parity`, `d3d12_com`, `replay_texture_barrier`, `vk_command_replay` and `command_list` pass on both. - **On today's `main` `79d044e54` + `59dcc9e91`:** it merges cleanly; the 13 docs and writer tests pass; `check_no_game_data.py` is clean on the 8 changed files. The merges into `main` since that suite run are Python and shader-fixture changes only. - **Not measured here:** live WARP for the three new rows (Luna-OS ran live WARP on an earlier head) and the retail title issuing this barrier (#984's report). - **CI had not finished on this head.** The `needs rebase` label was out of date. A small follow-up, not blocking: on `main`'s code `replay_texture_barrier` crashes instead of failing a check; an early return after the failed record would make that failure easier to read. AI-assisted (Claude Code, Claude Fable 5.2 and Claude Opus 5.5).
This discussion has been locked. Commenting is limited to contributors.
No description provided.