startup: implement command-list slots 53-55 ClearUAV and Discard (Part of #870) #1972

Manually merged
github merged 4 commits from gh-pr/1972/head into gh-pr/1972/base 2026-11-26 23:46:38 +00:00
Owner

@⁠tedin7 on GitHub · 2026-11-24 22:21 UTC · original
tedin7:x2w-frontier-slots53-55 → main · +378 −0 · 3 files · 4 commits · merged 2026-11-25 14:36 UTC

Part of #870

What this unblocks: render targets and UAV buffers cleared (and discarded) on a list before the first world frame no longer hit the no-op trap at list slots 53/54/55.

Summary:

  • Slot 53/54 ClearUnorderedAccessViewUint/Float: the CPU handle is resolved through its shadow record (copied descriptors follow), the GPU handle must lie on a known CBV/SRV/UAV heap, the resource must allow unordered access; the target moves to UNORDERED_ACCESS around the clear. Anything else is refused, logged and counted.
  • Slot 55 DiscardResource: render, depth and UAV resources are moved to the matching state and discarded; other resources, unreadable regions and null resources are dropped (discard is a hint).
  • New test startup_clear_uav (ctest startup_clear_uav_warp / _hardware): uint clear, rect clear, float clear, refused clears (bad GPU handle, empty CPU handle, no values) leave the target untouched, discards with and without region; readback on the desktop device, no device removal, no debug-layer errors. Without the handlers the slots are no-ops and the readback assertions fail.

Verification:

  • git diff --check : clean
  • x86_64-w64-mingw32-g++ -std=c++17 -fsyntax-only tests/startup_clear_uav.cpp : no errors
  • x86_64-w64-mingw32-g++ -fsyntax-only on d3d12_xs_device.cpp : only the pre-existing MSVC __try/__except errors in local_log.h, none in the new code
  • Win2025 (NOT yet run): Release build, ctest -R startup_clear_uav on WARP and hardware

AI-assisted; commands listed were executed locally.

**@⁠tedin7** on GitHub · 2026-11-24 22:21 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1972) `tedin7:x2w-frontier-slots53-55` → `main` · +378 −0 · 3 files · 4 commits · merged 2026-11-25 14:36 UTC Part of #870 What this unblocks: render targets and UAV buffers cleared (and discarded) on a list before the first world frame no longer hit the no-op trap at list slots 53/54/55. Summary: - Slot 53/54 ClearUnorderedAccessViewUint/Float: the CPU handle is resolved through its shadow record (copied descriptors follow), the GPU handle must lie on a known CBV/SRV/UAV heap, the resource must allow unordered access; the target moves to UNORDERED_ACCESS around the clear. Anything else is refused, logged and counted. - Slot 55 DiscardResource: render, depth and UAV resources are moved to the matching state and discarded; other resources, unreadable regions and null resources are dropped (discard is a hint). - New test `startup_clear_uav` (ctest `startup_clear_uav_warp` / `_hardware`): uint clear, rect clear, float clear, refused clears (bad GPU handle, empty CPU handle, no values) leave the target untouched, discards with and without region; readback on the desktop device, no device removal, no debug-layer errors. Without the handlers the slots are no-ops and the readback assertions fail. Verification: - `git diff --check` : clean - `x86_64-w64-mingw32-g++ -std=c++17 -fsyntax-only tests/startup_clear_uav.cpp` : no errors - `x86_64-w64-mingw32-g++ -fsyntax-only` on d3d12_xs_device.cpp : only the pre-existing MSVC `__try/__except` errors in local_log.h, none in the new code - Win2025 (NOT yet run): Release build, `ctest -R startup_clear_uav` on WARP and hardware AI-assisted; commands listed were executed locally.
Part of #870. Slots 53 and 54 clear a UAV through its shadow record (CPU
handle) with the GPU handle checked against known heaps; slot 55 discards
render, depth and UAV resources and drops other resources. Refusals are
logged and counted. Adds startup_clear_uav (WARP + hardware readback).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 23:46:36 +00:00
github manually merged commit 1c4a9ac63d into gh-pr/1972/base 2026-11-26 23:46:38 +00:00
Author
Owner

@⁠ChazY11 on GitHub · 2026-11-24 22:36 UTC · original

Merge-order check: these four PRs cannot all land in any order — one pair conflicts, the other three compose

Four open PRs now add command-list behaviour to the same two files (CMakeLists.txt, src/startup_stubs/d3d12_xs_device.cpp):
#1975, #1974, #1972, #1944. I merged them against main 889cd3f4 in every pair, then all four together.

#1975 + #1974   clean
#1975 + #1972   clean
#1975 + #1944   clean
#1974 + #1972   clean
#1974 + #1944   clean
#1972 + #1944   conflict: CMakeLists.txt, src/startup_stubs/d3d12_xs_device.cpp

And the four-way merge conflicts on the same pair, at the shared CMakeLists.txt insertion point just after the
foreach(backend IN ITEMS warp hardware …) block that registers the list tests — the two PRs append their new
add_executable / add_test group at the same anchor, so git has no ordering hint to pick.

The three that do compose, compose for real

Merged #1975 + #1974 + #1972 onto main, configured, built and ran their tests:

git merge pr-1975 pr-1974 pr-1972          # 0 conflicts
cmake --preset dev                          # Generating done
cmake --build --preset dev --target startup_root_constant_store startup_list_dispatch_check startup_clear_uav
build exit 0

ctest --preset dev -R 'root_constant|list_dispatch|clear_uav'
1/6 startup_root_constant_store ............   Passed 0.15
2/6 startup_clear_uav_warp .................   Passed 0.62
3/6 startup_clear_uav_hardware .............   Passed 4.03   (physical GPU, not a skip)
4/6 startup_list_dispatch ..................   Passed 0.14
5/6 startup_list_dispatch_no-limit_control .   Passed 0.03
6/6 startup_list_dispatch_no-state_control .   Passed 0.02
100% tests passed, 0 tests failed out of 6

So the command-list slots those three add coexist in one build, including both negative controls that #1974 registers.

What this means for ordering

Nothing is semantically wrong with #1944 — it is a text conflict at a shared anchor. The practical consequence is that whichever of
#1972 / #1944 lands second has to rebase
, and a rebase that resolves the anchor by hand needs the same care as the original: the
ENVIRONMENT list (X2W_D3D12_PERMISSIVE, X2W_D3D12_LIST_NOOP, X2W_D3D12_RENDER, X2W_D3D12_DEBUG) and SKIP_RETURN_CODE 77
have to survive on both groups, or one PR's tests silently run without the permissive flags and fail in CI instead of here.

I did not resolve the conflict myself: the resolution depends on which PR the maintainer wants first, and inventing an ordering would
hide the decision.

Aside, same family

#1951 and #1947 (the two tools/ PRs in this batch) touch different files and do not conflict with any of the above.

Notes

  • AI-assisted, run on Windows 11 build 26300.9974 with MSVC 19.44.
**@⁠ChazY11** on GitHub · 2026-11-24 22:36 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1972#issuecomment-7146435142) ## Merge-order check: these four PRs cannot all land in any order — one pair conflicts, the other three compose Four open PRs now add command-list behaviour to the same two files (`CMakeLists.txt`, `src/startup_stubs/d3d12_xs_device.cpp`): #1975, #1974, #1972, #1944. I merged them against `main` `889cd3f4` in every pair, then all four together. ```text #1975 + #1974 clean #1975 + #1972 clean #1975 + #1944 clean #1974 + #1972 clean #1974 + #1944 clean #1972 + #1944 conflict: CMakeLists.txt, src/startup_stubs/d3d12_xs_device.cpp ``` And the four-way merge conflicts on the same pair, at the shared `CMakeLists.txt` insertion point just after the `foreach(backend IN ITEMS warp hardware …)` block that registers the list tests — the two PRs append their new `add_executable` / `add_test` group at the same anchor, so `git` has no ordering hint to pick. ## The three that do compose, compose for real Merged #1975 + #1974 + #1972 onto `main`, configured, built and ran their tests: ```powershell git merge pr-1975 pr-1974 pr-1972 # 0 conflicts cmake --preset dev # Generating done cmake --build --preset dev --target startup_root_constant_store startup_list_dispatch_check startup_clear_uav build exit 0 ctest --preset dev -R 'root_constant|list_dispatch|clear_uav' 1/6 startup_root_constant_store ............ Passed 0.15 2/6 startup_clear_uav_warp ................. Passed 0.62 3/6 startup_clear_uav_hardware ............. Passed 4.03 (physical GPU, not a skip) 4/6 startup_list_dispatch .................. Passed 0.14 5/6 startup_list_dispatch_no-limit_control . Passed 0.03 6/6 startup_list_dispatch_no-state_control . Passed 0.02 100% tests passed, 0 tests failed out of 6 ``` So the command-list slots those three add coexist in one build, including both negative controls that #1974 registers. ## What this means for ordering Nothing is semantically wrong with #1944 — it is a text conflict at a shared anchor. The practical consequence is that **whichever of #1972 / #1944 lands second has to rebase**, and a rebase that resolves the anchor by hand needs the same care as the original: the `ENVIRONMENT` list (`X2W_D3D12_PERMISSIVE`, `X2W_D3D12_LIST_NOOP`, `X2W_D3D12_RENDER`, `X2W_D3D12_DEBUG`) and `SKIP_RETURN_CODE 77` have to survive on both groups, or one PR's tests silently run without the permissive flags and fail in CI instead of here. I did not resolve the conflict myself: the resolution depends on which PR the maintainer wants first, and inventing an ordering would hide the decision. ## Aside, same family #1951 and #1947 (the two `tools/` PRs in this batch) touch different files and do not conflict with any of the above. ## Notes - AI-assisted, run on Windows 11 build 26300.9974 with MSVC 19.44.
Author
Owner

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-11-24 22:36 UTC · original · edited 2026-11-24 22:45 UTC

Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-24T22:45:42.071137Z 0d81de3 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@⁠codex review" or "@⁠codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

**@⁠chatgpt-codex-connector[bot]** on GitHub · 2026-11-24 22:36 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1972#issuecomment-7146439678) · edited 2026-11-24 22:45 UTC <!-- codex-pull-request-review-summary --> <!-- codex-review-state:v1 {"code_review":{"commit_sha":"0d81de30e1077ec01fb16c4397c8cd35309d78c7","has_any_findings":true,"has_unresolved_findings":true,"status":"completed"},"security_review":{"commit_sha":null,"has_any_findings":null,"has_unresolved_findings":null,"status":null}} --> <details> <summary><strong>Codex Review Summary</strong>: ✅ Completed</summary> This comment shows the latest Codex review activity on this pull request. | Review | Status | Commit | Review trigger | | --- | --- | --- | --- | | 📝 **Code Review** | ✅ **Completed** <relative-time datetime="2026-11-24T22:45:42.071137Z">2026-11-24T22:45:42.071137Z</relative-time> | `0d81de3` | Draft marked ready | <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@⁠codex review" or "@⁠codex security review". Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. </details> </details>
@ -2906,0 +2966,4 @@
const D3D12_GPU_DESCRIPTOR_HANDLE gpu{gpu_handle};
const D3D12_CPU_DESCRIPTOR_HANDLE cpu{static_cast<SIZE_T>(desktop)};
if (Float) list->ClearUnorderedAccessViewFloat(gpu, cpu, target, static_cast<const float*>(values), rect_count, rect_count ? rects : nullptr);
else list->ClearUnorderedAccessViewUint(gpu, cpu, target, static_cast<const UINT*>(values), rect_count, rect_count ? rects : nullptr);
Author
Owner

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-11-24 22:45 UTC · original

P1 Badge Bind the GPU descriptor's heap before issuing a clear

For a valid clear, including those in the new fixture, the GPU descriptor's heap is never bound to the desktop list. list_set_descriptor_heaps in d3d12_draw.inl only caches the title's heaps, while translated draws bind a different private heap. Both desktop clear APIs require the GPU descriptor to belong to the currently bound shader-visible heap, so checking that the address belongs to some known heap is insufficient: these calls produce validation errors instead of a usable recording. Resolve and bind the owning heap for the clear, then restore or invalidate the translated-heap cache so subsequent draws bind their heap again.

Useful? React with 👍 / 👎.

**@⁠chatgpt-codex-connector[bot]** on GitHub · 2026-11-24 22:45 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1972#discussion_r4687563464) **<sub><sub>![P1 Badge](https://img.shields.io/badge/P1-orange?style=flat)</sub></sub> Bind the GPU descriptor's heap before issuing a clear** For a valid clear, including those in the new fixture, the GPU descriptor's heap is never bound to the desktop list. `list_set_descriptor_heaps` in `d3d12_draw.inl` only caches the title's heaps, while translated draws bind a different private heap. Both desktop clear APIs require the GPU descriptor to belong to the currently bound shader-visible heap, so checking that the address belongs to some known heap is insufficient: these calls produce validation errors instead of a usable recording. Resolve and bind the owning heap for the clear, then restore or invalidate the translated-heap cache so subsequent draws bind their heap again. Useful? React with 👍 / 👎. <!-- codex-code-review-finding:v1 -->
@ -2906,0 +2958,4 @@
}
if (first_calls(logged, 4)) log("x2w-render %s view=0x%llx target=%p rects=%u", name, cpu_handle, static_cast<void*>(target), rect_count);
auto* list = static_cast<ID3D12GraphicsCommandList*>(self->own().real);
require_state(self, target, D3D12_RESOURCE_STATE_UNORDERED_ACCESS);
Author
Owner

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-11-24 22:45 UTC · original

P2 Badge Respect the initial state of placed UAV buffers

When the view targets a buffer placed through device slot 133 with initial state UNORDERED_ACCESS, device_place_resource_x deliberately preserves that state and records it in ResourceInfo::initial_state. This handler nevertheless calls require_state, which assumes every newly encountered resource starts in COMMON and emits a COMMON -> UNORDERED_ACCESS barrier. The first clear therefore records an incorrect StateBefore, potentially invalidating the command list even though the resource and view are valid. Consult the recorded state before using this COMMON-only tracker, or refuse non-COMMON resources as list_execute_indirect already does. The new discard handler has the same unchecked use of the tracker.

Useful? React with 👍 / 👎.

**@⁠chatgpt-codex-connector[bot]** on GitHub · 2026-11-24 22:45 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1972#discussion_r4687563474) **<sub><sub>![P2 Badge](https://img.shields.io/badge/P2-yellow?style=flat)</sub></sub> Respect the initial state of placed UAV buffers** When the view targets a buffer placed through device slot 133 with initial state `UNORDERED_ACCESS`, `device_place_resource_x` deliberately preserves that state and records it in `ResourceInfo::initial_state`. This handler nevertheless calls `require_state`, which assumes every newly encountered resource starts in `COMMON` and emits a `COMMON -> UNORDERED_ACCESS` barrier. The first clear therefore records an incorrect `StateBefore`, potentially invalidating the command list even though the resource and view are valid. Consult the recorded state before using this COMMON-only tracker, or refuse non-COMMON resources as `list_execute_indirect` already does. The new discard handler has the same unchecked use of the tracker. Useful? React with 👍 / 👎. <!-- codex-code-review-finding:v1 -->
Author
Owner

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-11-24 22:45 UTC · original

P2 Badge Count debug-layer errors before the shim drains them

Both registered tests enable X2W_D3D12_DEBUG=1, under which Probe::submit reaches queue_execute, calls check_device, and clears the same device's stored debug messages with ClearStoredMessages(). By the time this assertion runs, synchronous validation errors from recording the clears/discards and submitting the list have already been removed. The reported error count therefore does not establish that the command path was validation-clean; it primarily checks messages from the later observer readbacks. Register a message callback before recording, as startup_root_heap.cpp does, or expose a cumulative error count instead of inspecting the drained queue.

Useful? React with 👍 / 👎.

**@⁠chatgpt-codex-connector[bot]** on GitHub · 2026-11-24 22:45 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1972#discussion_r4687563485) **<sub><sub>![P2 Badge](https://img.shields.io/badge/P2-yellow?style=flat)</sub></sub> Count debug-layer errors before the shim drains them** Both registered tests enable `X2W_D3D12_DEBUG=1`, under which `Probe::submit` reaches `queue_execute`, calls `check_device`, and clears the same device's stored debug messages with `ClearStoredMessages()`. By the time this assertion runs, synchronous validation errors from recording the clears/discards and submitting the list have already been removed. The reported error count therefore does not establish that the command path was validation-clean; it primarily checks messages from the later observer readbacks. Register a message callback before recording, as `startup_root_heap.cpp` does, or expose a cumulative error count instead of inspecting the drained queue. Useful? React with 👍 / 👎. <!-- codex-code-review-finding:v1 -->
Author
Owner

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

WARP and hardware run at head 0d81de30 (Debug build, Windows 11 build 26300, NVIDIA GeForce RTX 3070 Ti driver 32.0.16.2101, debug layer enabled): 2/2 passed, 0 capability skips (exit code 77).

ctest --test-dir out/build/dev -j1 --no-tests=error -R '^startup_clear_uav_' -V

In both startup_clear_uav_warp and startup_clear_uav_hardware the debug layer emits three sev=1 messages (D3D12_MESSAGE_SEVERITY_ERROR), yet the last line of each test is debug layer errors: 0:

x2w-d3d12-debug [CommandQueue execute 35] sev=1 id=1314 ID3D12CommandList::ClearUnorderedAccessViewUint: The specified GPU decriptor handle needs to be from the descriptor heap currently set on the command list.
x2w-d3d12-debug [CommandQueue execute 35] sev=1 id=1314 ID3D12CommandList::ClearUnorderedAccessViewUint: The specified GPU decriptor handle needs to be from the descriptor heap currently set on the command list.
x2w-d3d12-debug [CommandQueue execute 35] sev=1 id=1314 ID3D12CommandList::ClearUnorderedAccessViewFloat: The specified GPU decriptor handle needs to be from the descriptor heap currently set on the command list.
...
device removed reason: 0x00000000, debug layer errors: 0

So the test passes and reports 0 errors although the layer reported errors, on both WARP and the physical GPU. Codex's inline P2 comment on tests/startup_clear_uav.cpp at this head concerns the same error counter.

**@⁠Makto94** on GitHub · 2026-11-24 23:56 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1972#issuecomment-7147955542) WARP and hardware run at head `0d81de30` (Debug build, Windows 11 build 26300, NVIDIA GeForce RTX 3070 Ti driver 32.0.16.2101, debug layer enabled): 2/2 passed, 0 capability skips (exit code 77). ``` ctest --test-dir out/build/dev -j1 --no-tests=error -R '^startup_clear_uav_' -V ``` In both `startup_clear_uav_warp` and `startup_clear_uav_hardware` the debug layer emits three `sev=1` messages (`D3D12_MESSAGE_SEVERITY_ERROR`), yet the last line of each test is `debug layer errors: 0`: ``` x2w-d3d12-debug [CommandQueue execute 35] sev=1 id=1314 ID3D12CommandList::ClearUnorderedAccessViewUint: The specified GPU decriptor handle needs to be from the descriptor heap currently set on the command list. x2w-d3d12-debug [CommandQueue execute 35] sev=1 id=1314 ID3D12CommandList::ClearUnorderedAccessViewUint: The specified GPU decriptor handle needs to be from the descriptor heap currently set on the command list. x2w-d3d12-debug [CommandQueue execute 35] sev=1 id=1314 ID3D12CommandList::ClearUnorderedAccessViewFloat: The specified GPU decriptor handle needs to be from the descriptor heap currently set on the command list. ... device removed reason: 0x00000000, debug layer errors: 0 ``` So the test passes and reports 0 errors although the layer reported errors, on both WARP and the physical GPU. Codex's inline P2 comment on `tests/startup_clear_uav.cpp` at this head concerns the same error counter.
@ -2906,0 +2966,4 @@
const D3D12_GPU_DESCRIPTOR_HANDLE gpu{gpu_handle};
const D3D12_CPU_DESCRIPTOR_HANDLE cpu{static_cast<SIZE_T>(desktop)};
if (Float) list->ClearUnorderedAccessViewFloat(gpu, cpu, target, static_cast<const float*>(values), rect_count, rect_count ? rects : nullptr);
else list->ClearUnorderedAccessViewUint(gpu, cpu, target, static_cast<const UINT*>(values), rect_count, rect_count ? rects : nullptr);
Author
Owner

@⁠tedin7 on GitHub · 2026-11-25 01:12 UTC · original

Fixed in 248e2d5d and 99cc35ae. The clear binds the heap that owns the GPU handle and resets the translated-heap cache. Non-COMMON initial states are refused for clear and discard. The test counts debug errors through a message callback registered before recording. Win2025 WARP: startup_clear_uav_warp passed (dev and release).

AI-assisted; commands listed were executed locally.

**@⁠tedin7** on GitHub · 2026-11-25 01:12 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1972#discussion_r4688829492) Fixed in 248e2d5d and 99cc35ae. The clear binds the heap that owns the GPU handle and resets the translated-heap cache. Non-COMMON initial states are refused for clear and discard. The test counts debug errors through a message callback registered before recording. Win2025 WARP: startup_clear_uav_warp passed (dev and release). AI-assisted; commands listed were executed locally.
@ -2906,0 +2958,4 @@
}
if (first_calls(logged, 4)) log("x2w-render %s view=0x%llx target=%p rects=%u", name, cpu_handle, static_cast<void*>(target), rect_count);
auto* list = static_cast<ID3D12GraphicsCommandList*>(self->own().real);
require_state(self, target, D3D12_RESOURCE_STATE_UNORDERED_ACCESS);
Author
Owner

@⁠tedin7 on GitHub · 2026-11-25 01:12 UTC · original

Fixed in 248e2d5d and 99cc35ae. The clear binds the heap that owns the GPU handle and resets the translated-heap cache. Non-COMMON initial states are refused for clear and discard. The test counts debug errors through a message callback registered before recording. Win2025 WARP: startup_clear_uav_warp passed (dev and release).

AI-assisted; commands listed were executed locally.

**@⁠tedin7** on GitHub · 2026-11-25 01:12 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1972#discussion_r4688829683) Fixed in 248e2d5d and 99cc35ae. The clear binds the heap that owns the GPU handle and resets the translated-heap cache. Non-COMMON initial states are refused for clear and discard. The test counts debug errors through a message callback registered before recording. Win2025 WARP: startup_clear_uav_warp passed (dev and release). AI-assisted; commands listed were executed locally.
Author
Owner

@⁠tedin7 on GitHub · 2026-11-25 01:12 UTC · original

Fixed in 248e2d5d and 99cc35ae. The clear binds the heap that owns the GPU handle and resets the translated-heap cache. Non-COMMON initial states are refused for clear and discard. The test counts debug errors through a message callback registered before recording. Win2025 WARP: startup_clear_uav_warp passed (dev and release).

AI-assisted; commands listed were executed locally.

**@⁠tedin7** on GitHub · 2026-11-25 01:12 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1972#discussion_r4688829869) Fixed in 248e2d5d and 99cc35ae. The clear binds the heap that owns the GPU handle and resets the translated-heap cache. Non-COMMON initial states are refused for clear and discard. The test counts debug errors through a message callback registered before recording. Win2025 WARP: startup_clear_uav_warp passed (dev and release). AI-assisted; commands listed were executed locally.
Author
Owner

@⁠Makto94 on GitHub · 2026-11-25 10:27 UTC · original

Head 3792cc25: startup_clear_uav_warp and startup_clear_uav_hardware both pass, and both end with device removed reason: 0x00000000, debug layer errors: 0.

.\tools\dev.ps1; ctest --preset dev --no-tests=error -j1 -R '^startup_clear_uav_warp$' -V
.\tools\dev.ps1; ctest --preset dev --no-tests=error -j1 -R '^startup_clear_uav_hardware$' -V

Environment: NVIDIA GeForce RTX 3070 Ti (driver 32.0.16.2101) and WARP; Windows 11 build 26300.9974; Debug build; D3D12 debug layer enabled (x2w-d3d12 debug layer: 0x00000000 enabled). 0 capability skips (77). The hardware run was serial on an idle machine.

Compared with my earlier run at 0d81de30:

  • The three x2w-d3d12-debug ... sev=1 id=1314 lines (GPU descriptor handle not from the bound heap) no longer appear in either log (0 matches).
  • The log now has three refused clears: x2w-d3d12 ClearUnorderedAccessViewUint skipped: GPU handle is on no known descriptor heap, ... skipped: view holds no known resource and ... skipped: no clear values. Checks 4 to 6 of the test read refused +1 (expected +1).
  • The test counts errors with a message callback now (RegisterMessageCallback). The log has no no debug layer message callback line, so the callback registered on both adapters.

I did not run a negative control that makes the callback fire in this run, so "0 errors" shows that no error message arrived, not that the callback is proven to catch one.

**@⁠Makto94** on GitHub · 2026-11-25 10:27 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1972#issuecomment-7159721945) Head `3792cc25`: `startup_clear_uav_warp` and `startup_clear_uav_hardware` both pass, and both end with `device removed reason: 0x00000000, debug layer errors: 0`. ```powershell .\tools\dev.ps1; ctest --preset dev --no-tests=error -j1 -R '^startup_clear_uav_warp$' -V .\tools\dev.ps1; ctest --preset dev --no-tests=error -j1 -R '^startup_clear_uav_hardware$' -V ``` Environment: NVIDIA GeForce RTX 3070 Ti (driver 32.0.16.2101) and WARP; Windows 11 build 26300.9974; Debug build; D3D12 debug layer enabled (`x2w-d3d12 debug layer: 0x00000000 enabled`). 0 capability skips (77). The hardware run was serial on an idle machine. Compared with my earlier run at `0d81de30`: - The three `x2w-d3d12-debug ... sev=1 id=1314` lines (GPU descriptor handle not from the bound heap) no longer appear in either log (0 matches). - The log now has three refused clears: `x2w-d3d12 ClearUnorderedAccessViewUint skipped: GPU handle is on no known descriptor heap`, `... skipped: view holds no known resource` and `... skipped: no clear values`. Checks 4 to 6 of the test read `refused +1 (expected +1)`. - The test counts errors with a message callback now (`RegisterMessageCallback`). The log has no `no debug layer message callback` line, so the callback registered on both adapters. I did not run a negative control that makes the callback fire in this run, so "0 errors" shows that no error message arrived, not that the callback is proven to catch one.
Author
Owner

@⁠tedin7 on GitHub · 2026-11-25 10:52 UTC · original

Thank you @⁠Makto94 for the re-run at 3792cc25 on WARP and hardware, and for noting that the callback is not yet proven by a negative control.

AI-assisted; commands listed were executed locally.

**@⁠tedin7** on GitHub · 2026-11-25 10:52 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1972#issuecomment-7160293075) Thank you @⁠Makto94 for the re-run at 3792cc25 on WARP and hardware, and for noting that the callback is not yet proven by a negative control. AI-assisted; commands listed were executed locally.
Author
Owner

@⁠tedin7 on GitHub · 2026-11-25 11:10 UTC · original

Stage-2 verification at 3792cc25 (Win2025, WARP, default 3-slot pool):

  • Dev preset: build OK, ctest -R '^(...startup_clear_uav_warp...)$' (23 direct downstream tests): 23/23 passed.
  • Release /O2 preset: build OK (106.64s), same 23 tests: 23/23 passed (startup_clear_uav_warp 0.14s).
  • Hardware variants are not runnable on the VM (WARP only); the hardware run is the one posted by @⁠Makto94 above.
  • GitHub CI on this head: Windows build and test, Linux Python checks and gfx1013 fixtures all pass. Mergeable, clean against main.
  • Diff, title, body and commit messages checked: no attribution trailers, no tool or model names.

AI-assisted; commands listed were executed locally.

**@⁠tedin7** on GitHub · 2026-11-25 11:10 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1972#issuecomment-7160683265) Stage-2 verification at `3792cc25` (Win2025, WARP, default 3-slot pool): - Dev preset: build OK, `ctest -R '^(...startup_clear_uav_warp...)$'` (23 direct downstream tests): **23/23 passed**. - Release `/O2` preset: build OK (`106.64s`), same 23 tests: **23/23 passed** (`startup_clear_uav_warp` `0.14s`). - Hardware variants are not runnable on the VM (WARP only); the hardware run is the one posted by @⁠Makto94 above. - GitHub CI on this head: Windows build and test, Linux Python checks and gfx1013 fixtures all pass. Mergeable, clean against `main`. - Diff, title, body and commit messages checked: no attribution trailers, no tool or model names. AI-assisted; commands listed were executed locally.
Author
Owner

@⁠tedin7 on GitHub · 2026-11-25 14:32 UTC · original

Win2025 WARP receipt for head 1c4a9ac6 after updating with main.

Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit 1c4a9ac63d705af36a0af7d7b9f2d08780f92f0f:

  • Debug (--preset dev):
    • Build (cmake --build --preset dev --target cpu_exe_io cpu_shim_draw cpu_shim_startup cpu_shim_startup_guest cpu_shim_startup_lifted d3d12_xs_device_obj d3d12_xs_shim d3d12x_compute_list_check d3d12x_descriptor_check d3d12x_device_check d3d12x_device_struct_return_control d3d12x_graphics_list_check pe_map startup_clear_uav startup_stub_acphal startup_stub_chad startup_stub_consumer startup_stub_gameinput startup_stub_xapu startup_stub_xcrdapi startup_stub_xg_xs xgameruntime_preflight_exe xgameruntime_shim xmem_shim -- -j 2): 30.55s (configure 2.00s)
    • Test (ctest --preset dev -R '^(cpu_native_shim_startup|cpu_shim_chain_warp|cpu_shim_compute_warp|cpu_shim_draw_warp|cpu_shim_shadow_warp|cpu_shim_texture_reuse_warp|cpu_shim_upload_texture_warp|d3d12x_compute_list_warp|d3d12x_descriptor_heap_warp|d3d12x_descriptor_negative_warp|d3d12x_descriptor_table_warp|d3d12x_device_create_warp|d3d12x_device_negative_warp|d3d12x_device_struct_return_neither_control_warp|d3d12x_device_struct_return_warp|d3d12x_graphics_list_warp|d3d12x_pso_reject_warp|d3d12x_pso_static_sampler_warp|startup_build_rev_dll|startup_clear_uav_warp|startup_sampler_heap_wrapped_warp|startup_stubs|xgameruntime_preflight_stub_refused)$' --parallel 2 --no-tests=error --output-on-failure): 23/23 passed (9.56s: cpu_shim_upload_texture_warp 3.22s, cpu_shim_shadow_warp 4.20s, cpu_shim_chain_warp 2.25s, cpu_shim_draw_warp 2.72s, cpu_shim_compute_warp 2.09s, cpu_native_shim_startup 1.28s, cpu_shim_texture_reuse_warp 1.26s, startup_stubs 0.72s, startup_sampler_heap_wrapped_warp 0.14s, d3d12x_descriptor_heap_warp 0.04s, startup_build_rev_dll 0.11s, startup_clear_uav_warp 0.06s, xgameruntime_preflight_stub_refused 0.28s, d3d12x_descriptor_table_warp 0.05s, d3d12x_compute_list_warp 0.05s, d3d12x_graphics_list_warp 0.06s, d3d12x_device_create_warp 0.04s, d3d12x_descriptor_negative_warp 0.05s, d3d12x_pso_reject_warp 0.04s, d3d12x_pso_static_sampler_warp 0.04s, d3d12x_device_struct_return_neither_control_warp 0.05s, d3d12x_device_struct_return_warp 0.04s, d3d12x_device_negative_warp 0.03s)
  • Release /O2 (--preset release):
    • Build (cmake --build --preset release --target cpu_exe_io cpu_shim_draw cpu_shim_startup cpu_shim_startup_guest cpu_shim_startup_lifted d3d12_xs_device_obj d3d12_xs_shim d3d12x_compute_list_check d3d12x_descriptor_check d3d12x_device_check d3d12x_device_struct_return_control d3d12x_graphics_list_check pe_map startup_clear_uav startup_stub_acphal startup_stub_chad startup_stub_consumer startup_stub_gameinput startup_stub_xapu startup_stub_xcrdapi startup_stub_xg_xs xgameruntime_preflight_exe xgameruntime_shim xmem_shim -- -j 2): 59.18s (configure 1.97s)
    • Test (ctest --preset release -R '^(cpu_native_shim_startup|cpu_shim_chain_warp|cpu_shim_compute_warp|cpu_shim_draw_warp|cpu_shim_shadow_warp|cpu_shim_texture_reuse_warp|cpu_shim_upload_texture_warp|d3d12x_compute_list_warp|d3d12x_descriptor_heap_warp|d3d12x_descriptor_negative_warp|d3d12x_descriptor_table_warp|d3d12x_device_create_warp|d3d12x_device_negative_warp|d3d12x_device_struct_return_neither_control_warp|d3d12x_device_struct_return_warp|d3d12x_graphics_list_warp|d3d12x_pso_reject_warp|d3d12x_pso_static_sampler_warp|startup_build_rev_dll|startup_clear_uav_warp|startup_sampler_heap_wrapped_warp|startup_stubs|xgameruntime_preflight_stub_refused)$' --parallel 2 --no-tests=error --output-on-failure): 23/23 passed (9.34s: cpu_shim_upload_texture_warp 3.04s, cpu_shim_shadow_warp 3.99s, cpu_shim_chain_warp 2.20s, cpu_shim_draw_warp 3.08s, cpu_shim_compute_warp 1.93s, cpu_native_shim_startup 1.31s, cpu_shim_texture_reuse_warp 1.21s, startup_sampler_heap_wrapped_warp 0.14s, xgameruntime_preflight_stub_refused 0.23s, startup_build_rev_dll 0.08s, d3d12x_compute_list_warp 0.05s, d3d12x_graphics_list_warp 0.05s, startup_clear_uav_warp 0.06s, d3d12x_descriptor_table_warp 0.04s, startup_stubs 0.68s, d3d12x_descriptor_heap_warp 0.04s, d3d12x_descriptor_negative_warp 0.05s, d3d12x_device_struct_return_neither_control_warp 0.04s, d3d12x_device_create_warp 0.04s, d3d12x_pso_static_sampler_warp 0.04s, d3d12x_device_struct_return_warp 0.04s, d3d12x_pso_reject_warp 0.04s, d3d12x_device_negative_warp 0.02s)
  • sccache: 4/14 hits; wall 121.4s

AI-assisted; commands listed were executed locally.

**@⁠tedin7** on GitHub · 2026-11-25 14:32 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1972#issuecomment-7165439422) Win2025 WARP receipt for head 1c4a9ac6 after updating with main. Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit `1c4a9ac63d705af36a0af7d7b9f2d08780f92f0f`: - **Debug (`--preset dev`)**: - Build (`cmake --build --preset dev --target cpu_exe_io cpu_shim_draw cpu_shim_startup cpu_shim_startup_guest cpu_shim_startup_lifted d3d12_xs_device_obj d3d12_xs_shim d3d12x_compute_list_check d3d12x_descriptor_check d3d12x_device_check d3d12x_device_struct_return_control d3d12x_graphics_list_check pe_map startup_clear_uav startup_stub_acphal startup_stub_chad startup_stub_consumer startup_stub_gameinput startup_stub_xapu startup_stub_xcrdapi startup_stub_xg_xs xgameruntime_preflight_exe xgameruntime_shim xmem_shim -- -j 2`): `30.55s` (configure `2.00s`) - Test (`ctest --preset dev -R '^(cpu_native_shim_startup|cpu_shim_chain_warp|cpu_shim_compute_warp|cpu_shim_draw_warp|cpu_shim_shadow_warp|cpu_shim_texture_reuse_warp|cpu_shim_upload_texture_warp|d3d12x_compute_list_warp|d3d12x_descriptor_heap_warp|d3d12x_descriptor_negative_warp|d3d12x_descriptor_table_warp|d3d12x_device_create_warp|d3d12x_device_negative_warp|d3d12x_device_struct_return_neither_control_warp|d3d12x_device_struct_return_warp|d3d12x_graphics_list_warp|d3d12x_pso_reject_warp|d3d12x_pso_static_sampler_warp|startup_build_rev_dll|startup_clear_uav_warp|startup_sampler_heap_wrapped_warp|startup_stubs|xgameruntime_preflight_stub_refused)$' --parallel 2 --no-tests=error --output-on-failure`): **23/23 passed** (`9.56s`: `cpu_shim_upload_texture_warp` `3.22s`, `cpu_shim_shadow_warp` `4.20s`, `cpu_shim_chain_warp` `2.25s`, `cpu_shim_draw_warp` `2.72s`, `cpu_shim_compute_warp` `2.09s`, `cpu_native_shim_startup` `1.28s`, `cpu_shim_texture_reuse_warp` `1.26s`, `startup_stubs` `0.72s`, `startup_sampler_heap_wrapped_warp` `0.14s`, `d3d12x_descriptor_heap_warp` `0.04s`, `startup_build_rev_dll` `0.11s`, `startup_clear_uav_warp` `0.06s`, `xgameruntime_preflight_stub_refused` `0.28s`, `d3d12x_descriptor_table_warp` `0.05s`, `d3d12x_compute_list_warp` `0.05s`, `d3d12x_graphics_list_warp` `0.06s`, `d3d12x_device_create_warp` `0.04s`, `d3d12x_descriptor_negative_warp` `0.05s`, `d3d12x_pso_reject_warp` `0.04s`, `d3d12x_pso_static_sampler_warp` `0.04s`, `d3d12x_device_struct_return_neither_control_warp` `0.05s`, `d3d12x_device_struct_return_warp` `0.04s`, `d3d12x_device_negative_warp` `0.03s`) - **Release `/O2` (`--preset release`)**: - Build (`cmake --build --preset release --target cpu_exe_io cpu_shim_draw cpu_shim_startup cpu_shim_startup_guest cpu_shim_startup_lifted d3d12_xs_device_obj d3d12_xs_shim d3d12x_compute_list_check d3d12x_descriptor_check d3d12x_device_check d3d12x_device_struct_return_control d3d12x_graphics_list_check pe_map startup_clear_uav startup_stub_acphal startup_stub_chad startup_stub_consumer startup_stub_gameinput startup_stub_xapu startup_stub_xcrdapi startup_stub_xg_xs xgameruntime_preflight_exe xgameruntime_shim xmem_shim -- -j 2`): `59.18s` (configure `1.97s`) - Test (`ctest --preset release -R '^(cpu_native_shim_startup|cpu_shim_chain_warp|cpu_shim_compute_warp|cpu_shim_draw_warp|cpu_shim_shadow_warp|cpu_shim_texture_reuse_warp|cpu_shim_upload_texture_warp|d3d12x_compute_list_warp|d3d12x_descriptor_heap_warp|d3d12x_descriptor_negative_warp|d3d12x_descriptor_table_warp|d3d12x_device_create_warp|d3d12x_device_negative_warp|d3d12x_device_struct_return_neither_control_warp|d3d12x_device_struct_return_warp|d3d12x_graphics_list_warp|d3d12x_pso_reject_warp|d3d12x_pso_static_sampler_warp|startup_build_rev_dll|startup_clear_uav_warp|startup_sampler_heap_wrapped_warp|startup_stubs|xgameruntime_preflight_stub_refused)$' --parallel 2 --no-tests=error --output-on-failure`): **23/23 passed** (`9.34s`: `cpu_shim_upload_texture_warp` `3.04s`, `cpu_shim_shadow_warp` `3.99s`, `cpu_shim_chain_warp` `2.20s`, `cpu_shim_draw_warp` `3.08s`, `cpu_shim_compute_warp` `1.93s`, `cpu_native_shim_startup` `1.31s`, `cpu_shim_texture_reuse_warp` `1.21s`, `startup_sampler_heap_wrapped_warp` `0.14s`, `xgameruntime_preflight_stub_refused` `0.23s`, `startup_build_rev_dll` `0.08s`, `d3d12x_compute_list_warp` `0.05s`, `d3d12x_graphics_list_warp` `0.05s`, `startup_clear_uav_warp` `0.06s`, `d3d12x_descriptor_table_warp` `0.04s`, `startup_stubs` `0.68s`, `d3d12x_descriptor_heap_warp` `0.04s`, `d3d12x_descriptor_negative_warp` `0.05s`, `d3d12x_device_struct_return_neither_control_warp` `0.04s`, `d3d12x_device_create_warp` `0.04s`, `d3d12x_pso_static_sampler_warp` `0.04s`, `d3d12x_device_struct_return_warp` `0.04s`, `d3d12x_pso_reject_warp` `0.04s`, `d3d12x_device_negative_warp` `0.02s`) - `sccache`: 4/14 hits; wall `121.4s` AI-assisted; commands listed were executed locally.
Author
Owner

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-11-24 22:45 UTC · original · reviewed

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0d81de30e1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@⁠codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@⁠codex address that feedback".

**@⁠chatgpt-codex-connector[bot]** on GitHub · 2026-11-24 22:45 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/1972#pullrequestreview-6048582766) · **reviewed** <!-- codex-review-receipt:v1 --> ### 💡 Codex Review Here are some automated review suggestions for this pull request. **Reviewed commit:** `0d81de30e1` <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@⁠codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@⁠codex address that feedback". </details>
This discussion has been locked. Commenting is limited to contributors.
No description provided.