runtime: mark UAV writes before refreshing coherent placed buffers #3892

Open
github-bot wants to merge 12 commits from github-bot/gh-3890 into main AGit
Owner

@⁠Leyukaka on GitHub · 2026-12-02 21:00 UTC · original
Leyukaka:fix-3776-uav-refresh → main · +826 −66 · 11 files · 12 commits · open

Fixes the main regression from #3778. This is a follow-up to that work: it keeps the coherent refresh as merged and adds the write sources that the refresh did not know about yet. Thanks to @⁠Holastor for the refresh and its provenance marker, which this change reuses unchanged.

Problem

Since #3778, indirect_table_buffer and the compute root SRV path refresh a non-aliased placed buffer from guest memory unless the resource is marked GPU-written. Only copies set that mark (mark_gpu_written in list_copy.inl). A write made by a guest shader through a UAV did not, so a buffer written that way could be overwritten with the stale guest bytes before the draw read it.

Five tests fail on current main, confirmed on unmodified main on Windows:

  • startup_indirect_translated_draw_warp
  • startup_indirect_translated_draw_hardware
  • startup_indirect_translated_refusal_census_warp
  • startup_indirect_translated_refusal_census_hardware
  • startup_indirect_translated_refusal_census_control_warp

The refusal census tests report:

census key3 incomplete_table_buffer #2: pixel (0,0): got 0xff00ff00, expected 0xff000000

Change

Resources written through a guest UAV are now marked with the same marker as copies:

  • UAVs bound by a draw, including indirect draws and ExecuteIndirect, which go through draw_translated
  • UAVs bound by a dispatch
  • guest UAV clears (ClearUnorderedAccessViewUint and ClearUnorderedAccessViewFloat)
  • ResolveQueryData destinations

A buffer the GPU never wrote keeps the refresh from #3778.

The mark is per resource and is set when the command is recorded, as for copies. It has the same limitation as copies: a list recorded before the write and executed after it can still upload guest bytes.

The ResolveQueryData mark changes no result today. That slot only accepts a readback buffer without guest memory, which the refresh never handles. It is marked so that every GPU write follows the same rule.

Tests in tests/startup_indirect_draw_indexed.cpp:

  • The copied table case wrote its buffer through a desktop list, which the runtime cannot see, so the refresh was legitimate there. The case now writes through a guest UAV clear (list slot 53) and is still refused.
  • A new case draws from a UAV-capable placed buffer that is never written and expects the refreshed guest color.

Validation

On Windows (MSVC), WARP and hardware: 19/19 passed on base 0d00d996f, including the five tests that fail on unmodified main there. The branch was then rebased onto 25f8ebec5 without conflicts; I will rerun the same set on the new base and post the result here.

ctest --preset release --no-tests=error -j 1 -R "^(startup_indirect_translated_(draw|refusal_census)_(warp|hardware)|startup_indirect_translated_refusal_census_control_warp|startup_indirect_copy_provenance(_off)?_(warp|hardware)|startup_clear_uav_(warp|hardware)|startup_coherent_placed_srv_(warp|hardware)|startup_mesh86_material_backing.*)$"

Not covered

  • No test dispatches a compute shader that writes a buffer through a UAV and then reads it through the compute root SRV path. That path gets the same mark, but only the indirect table path is exercised by a test here.
  • The record-time limitation described above is unchanged.
**@⁠Leyukaka** on GitHub · 2026-12-02 21:00 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3890) `Leyukaka:fix-3776-uav-refresh` → `main` · +826 −66 · 11 files · 12 commits · open Fixes the main regression from #3778. This is a follow-up to that work: it keeps the coherent refresh as merged and adds the write sources that the refresh did not know about yet. Thanks to @⁠Holastor for the refresh and its provenance marker, which this change reuses unchanged. ## Problem Since #3778, `indirect_table_buffer` and the compute root SRV path refresh a non-aliased placed buffer from guest memory unless the resource is marked GPU-written. Only copies set that mark (`mark_gpu_written` in `list_copy.inl`). A write made by a guest shader through a UAV did not, so a buffer written that way could be overwritten with the stale guest bytes before the draw read it. Five tests fail on current `main`, confirmed on unmodified `main` on Windows: - `startup_indirect_translated_draw_warp` - `startup_indirect_translated_draw_hardware` - `startup_indirect_translated_refusal_census_warp` - `startup_indirect_translated_refusal_census_hardware` - `startup_indirect_translated_refusal_census_control_warp` The refusal census tests report: ```text census key3 incomplete_table_buffer #2: pixel (0,0): got 0xff00ff00, expected 0xff000000 ``` ## Change Resources written through a guest UAV are now marked with the same marker as copies: - UAVs bound by a draw, including indirect draws and `ExecuteIndirect`, which go through `draw_translated` - UAVs bound by a dispatch - guest UAV clears (`ClearUnorderedAccessViewUint` and `ClearUnorderedAccessViewFloat`) - `ResolveQueryData` destinations A buffer the GPU never wrote keeps the refresh from #3778. The mark is per resource and is set when the command is recorded, as for copies. It has the same limitation as copies: a list recorded before the write and executed after it can still upload guest bytes. The `ResolveQueryData` mark changes no result today. That slot only accepts a readback buffer without guest memory, which the refresh never handles. It is marked so that every GPU write follows the same rule. Tests in `tests/startup_indirect_draw_indexed.cpp`: - The copied table case wrote its buffer through a desktop list, which the runtime cannot see, so the refresh was legitimate there. The case now writes through a guest UAV clear (list slot 53) and is still refused. - A new case draws from a UAV-capable placed buffer that is never written and expects the refreshed guest color. ## Validation On Windows (MSVC), WARP and hardware: 19/19 passed on base `0d00d996f`, including the five tests that fail on unmodified `main` there. The branch was then rebased onto `25f8ebec5` without conflicts; I will rerun the same set on the new base and post the result here. ```text ctest --preset release --no-tests=error -j 1 -R "^(startup_indirect_translated_(draw|refusal_census)_(warp|hardware)|startup_indirect_translated_refusal_census_control_warp|startup_indirect_copy_provenance(_off)?_(warp|hardware)|startup_clear_uav_(warp|hardware)|startup_coherent_placed_srv_(warp|hardware)|startup_mesh86_material_backing.*)$" ``` ## Not covered - No test dispatches a compute shader that writes a buffer through a UAV and then reads it through the compute root SRV path. That path gets the same mark, but only the indirect table path is exercised by a test here. - The record-time limitation described above is unchanged.
#3776 refreshes a non-aliased placed buffer from guest memory unless
it was a copy destination. A shader write or a UAV clear was not
recorded. The refresh then replaced the GPU bytes with the stale guest
copy, and the draw used them.

Record those writes with the same marker as copies.
note_linear_gpu_write_resource is called for each UAV that a
translated draw or dispatch binds. A UAV clear on a guest list counts
too. indirect_table_buffer and the compute root SRV path then refuse
the buffer, and a buffer the GPU never wrote is still refreshed.

The copied table fixture used to write on the desktop list, which the
stand-in cannot see. It now clears the buffer through the guest list
and stays refused. A new case draws a UAV-capable placed buffer that is
never written and expects the refreshed guest color.
ResolveQueryData writes GPU bytes into its destination buffer. Mark it
with the coherent placed marker, like a copy, a UAV binding or a UAV
clear, so guest bytes are never refreshed over it. Today the slot only
accepts a readback buffer without guest memory, which the coherent
refresh never handles, so this keeps the rule uniform for later changes.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-02 21:05:00 +00:00
Author
Owner

@⁠R0Y00 on GitHub · 2026-12-02 21:12 UTC · original · requested changes

Independent MSVC Debug on 0cce5d07 passed the full 19-case WARP/RTX 4060 Laptop matrix. Removing only the mark in list_clear_uav reproduced all five translated-draw/census failures. There is also a newly exposed lifetime regression: I used the new refreshed_buffer case, recorded the same slot-53 clear against it on a second wrapped DIRECT list, closed and released that list without submitting it, and then submitted the ordinary translated read from the original list. On both adapters, head returned 0/8 red pixels (0xff000000, expected 0xff0000ff). Removing just the record-time mark made that read pass 8/8 on both; the later submitted-clear case then failed as expected. The global mark prevents the guest-backed read even though no GPU write ran. Please retain a list-local mark for same-list reads after a write, commit it only when the write is submitted, and discard pending marks when the list is reset or released. Keep both the submitted-clear and abandoned-list cases.

**@⁠R0Y00** on GitHub · 2026-12-02 21:12 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3890#pullrequestreview-6159100640) · **requested changes** Independent MSVC Debug on `0cce5d07` passed the full 19-case WARP/RTX 4060 Laptop matrix. Removing only the mark in `list_clear_uav` reproduced all five translated-draw/census failures. There is also a newly exposed lifetime regression: I used the new `refreshed_buffer` case, recorded the same slot-53 clear against it on a second wrapped DIRECT list, closed and released that list without submitting it, and then submitted the ordinary translated read from the original list. On both adapters, head returned 0/8 red pixels (`0xff000000`, expected `0xff0000ff`). Removing just the record-time mark made that read pass 8/8 on both; the later submitted-clear case then failed as expected. The global mark prevents the guest-backed read even though no GPU write ran. Please retain a list-local mark for same-list reads after a write, commit it only when the write is submitted, and discard pending marks when the list is reset or released. Keep both the submitted-clear and abandoned-list cases.
Author
Owner

@⁠R0Y00 on GitHub · 2026-12-02 21:29 UTC · original · reviewed

I pushed 73f3f639 for re-review. New UAV and query writes are visible to reads in the same recording. Submission commits the mark, and Reset/release drops a pending mark. The legacy copy paths keep their existing behavior. On Windows 11 build 26300, MSVC Debug passed all 19 targeted cases on WARP 10.0.26100.9818 and RTX 4060 Laptop 32.0.16.1656. The submitted-clear and abandoned-list readback cases both pass. In the standalone coherence test, removing only submission promotion fails both adapters with submit did not commit the pending GPU write; restoring it gives 2/2. The indirect-draw fixture runs with the debug layer enabled. Please independently review the new recording/submit transition before landing.

**@⁠R0Y00** on GitHub · 2026-12-02 21:29 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3890#pullrequestreview-6159342287) · **reviewed** I pushed `73f3f639` for re-review. New UAV and query writes are visible to reads in the same recording. Submission commits the mark, and Reset/release drops a pending mark. The legacy copy paths keep their existing behavior. On Windows 11 build 26300, MSVC Debug passed all 19 targeted cases on WARP 10.0.26100.9818 and RTX 4060 Laptop 32.0.16.1656. The submitted-clear and abandoned-list readback cases both pass. In the standalone coherence test, removing only submission promotion fails both adapters with `submit did not commit the pending GPU write`; restoring it gives 2/2. The indirect-draw fixture runs with the debug layer enabled. Please independently review the new recording/submit transition before landing.
Author
Owner

@⁠Leyukaka on GitHub · 2026-12-02 21:56 UTC · original

Thanks for 73f3f639. I reviewed the recording/submit transition at that commit. This was checked by reading the diff and the surrounding code, not built or run here.

Checked, looks right

  • Key: record_gpu_write / is_gpu_written(resource, list) key the pending mark on the native list, the same key refresh_range and commit_lists use, and on the whole buffer (coherent_placed_buffer.inl:164-181). Whole-resource tracking matches the old global mark and is the conservative choice for a UAV.
  • Same-recording reads: both readers pass their own list, so a write recorded earlier on that list is seen: the indirect table path (d3d12_draw.inl:3092), the compute root SRV path (d3d12_compute_dispatch.inl:1004), and refresh_range itself (coherent_placed_buffer.inl:307).
  • Submission: commit_lists runs inside the submit lambda after the native ExecuteCommandLists (d3d12_xs_device.cpp:5981), so it covers the plain batch, the per-list split path and the draw-dump / red-producer wrappers. A refused submission (linear_refresh failure) returns before it, and lists skipped for a failed Close or recycled chunks are not in the committed set.
  • Drop: Reset (d3d12_xs_device.cpp:2500), failed Close (:2555) and final release (:1536) all call discard_list, which erases the list entry, so a reused list address cannot inherit stale marks. erase(resource) also clears gpu_writes (coherent_placed_buffer.inl:256).
  • Locking: is_gpu_written(resource, list) releases list_cache_lock before the registry lookup, and commit_lists releases it before mark_gpu_written takes registry_lock. No new nesting.

One remaining gap: a write still pending on another list

The refresh decision is made when the reader is recorded, but the mark only becomes global at submission:

  1. List A records the slot-53 clear on placed buffer X (pending on A only).
  2. List B, recorded afterwards, records the translated draw that reads X's table. is_gpu_written(X, B) is false, so refresh_range records a copy of the guest bytes into B.
  3. The guest submits ExecuteCommandLists(2, {A, B}), or A then B in two calls.
  4. On the GPU, A clears X, B's copy then overwrites the clear with the stale guest bytes, and the draw reads them.

At 0cce5d07, step 2 was refused because the mark was already global. This is not a regression against main, which does not mark the clear at all, but it reopens part of what the previous commit closed, for lists recorded in sequence or on worker threads and submitted together.

One option that keeps your abandoned-list case passing: in is_gpu_written(resource, list), also return true when any other live entry in list_cache() holds the resource in gpu_writes. Released, Reset and failed-Close lists drop their entries, so an abandoned writer stops blocking as soon as it is released or Reset. The cost is a conservative refusal while an unsubmitted writer list is still alive, which is the previous behavior limited to that window.

Tests

  • Covered: copied_buffer (clear and read in the same recording), discarded_clear_buffer (abandoned list), and startup_coherent_placed_srv.cpp (mark visible only to the recording list, dropped on Reset, committed only by submission).
  • Not covered: a clear on one list followed by a read recorded on another list before the first is submitted, and the compute root SRV path with a list-local mark. A two-list case would pin the scenario above whichever way you decide it.

Minor, and older than this change: the non-render ExecuteCommandLists path (d3d12_xs_device.cpp:6027) does not call commit_lists. Harmless as long as nothing records these marks outside render mode.

**@⁠Leyukaka** on GitHub · 2026-12-02 21:56 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3890#issuecomment-7359998713) Thanks for `73f3f639`. I reviewed the recording/submit transition at that commit. This was checked by reading the diff and the surrounding code, not built or run here. **Checked, looks right** - Key: `record_gpu_write` / `is_gpu_written(resource, list)` key the pending mark on the native list, the same key `refresh_range` and `commit_lists` use, and on the whole buffer (`coherent_placed_buffer.inl:164-181`). Whole-resource tracking matches the old global mark and is the conservative choice for a UAV. - Same-recording reads: both readers pass their own list, so a write recorded earlier on that list is seen: the indirect table path (`d3d12_draw.inl:3092`), the compute root SRV path (`d3d12_compute_dispatch.inl:1004`), and `refresh_range` itself (`coherent_placed_buffer.inl:307`). - Submission: `commit_lists` runs inside the `submit` lambda after the native `ExecuteCommandLists` (`d3d12_xs_device.cpp:5981`), so it covers the plain batch, the per-list split path and the draw-dump / red-producer wrappers. A refused submission (`linear_refresh` failure) returns before it, and lists skipped for a failed Close or recycled chunks are not in the committed set. - Drop: Reset (`d3d12_xs_device.cpp:2500`), failed Close (`:2555`) and final release (`:1536`) all call `discard_list`, which erases the list entry, so a reused list address cannot inherit stale marks. `erase(resource)` also clears `gpu_writes` (`coherent_placed_buffer.inl:256`). - Locking: `is_gpu_written(resource, list)` releases `list_cache_lock` before the registry lookup, and `commit_lists` releases it before `mark_gpu_written` takes `registry_lock`. No new nesting. **One remaining gap: a write still pending on another list** The refresh decision is made when the reader is recorded, but the mark only becomes global at submission: 1. List A records the slot-53 clear on placed buffer X (pending on A only). 2. List B, recorded afterwards, records the translated draw that reads X's table. `is_gpu_written(X, B)` is false, so `refresh_range` records a copy of the guest bytes into B. 3. The guest submits `ExecuteCommandLists(2, {A, B})`, or A then B in two calls. 4. On the GPU, A clears X, B's copy then overwrites the clear with the stale guest bytes, and the draw reads them. At `0cce5d07`, step 2 was refused because the mark was already global. This is not a regression against `main`, which does not mark the clear at all, but it reopens part of what the previous commit closed, for lists recorded in sequence or on worker threads and submitted together. One option that keeps your abandoned-list case passing: in `is_gpu_written(resource, list)`, also return true when any other live entry in `list_cache()` holds the resource in `gpu_writes`. Released, Reset and failed-Close lists drop their entries, so an abandoned writer stops blocking as soon as it is released or Reset. The cost is a conservative refusal while an unsubmitted writer list is still alive, which is the previous behavior limited to that window. **Tests** - Covered: `copied_buffer` (clear and read in the same recording), `discarded_clear_buffer` (abandoned list), and `startup_coherent_placed_srv.cpp` (mark visible only to the recording list, dropped on Reset, committed only by submission). - Not covered: a clear on one list followed by a read recorded on another list before the first is submitted, and the compute root SRV path with a list-local mark. A two-list case would pin the scenario above whichever way you decide it. Minor, and older than this change: the non-render `ExecuteCommandLists` path (`d3d12_xs_device.cpp:6027`) does not call `commit_lists`. Harmless as long as nothing records these marks outside render mode.
Author
Owner

@⁠R0Y00 on GitHub · 2026-12-02 22:55 UTC · original · reviewed

I independently reproduced @⁠Leyukaka’s cross-list case on 73f3f639. The unmodified startup_coherent_placed_srv_(warp|hardware) selection passes 2/2. In a local source-built extension, list A copies 0xcafebabe to a default-heap backing and registers its pending GPU write. List B records the normal guest refresh and a readback before either list is submitted. Both lists are submitted in order in one batch. After the fence, WARP and RTX 4060 Laptop both read 0x77777777 from the guest shadow, and B had staged 65,536 bytes. Omitting only B's refresh for this control gives 0xcafebabe on both adapters. Please cover the ordered two-list case along with the existing abandoned-list case. We should also exercise recording B first and then submitting A before B, because a recording-time lookup of pending writers would not cover that order.

**@⁠R0Y00** on GitHub · 2026-12-02 22:55 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3890#pullrequestreview-6160497617) · **reviewed** I independently reproduced @⁠Leyukaka’s cross-list case on `73f3f639`. The unmodified `startup_coherent_placed_srv_(warp|hardware)` selection passes 2/2. In a local source-built extension, list A copies `0xcafebabe` to a default-heap backing and registers its pending GPU write. List B records the normal guest refresh and a readback before either list is submitted. Both lists are submitted in order in one batch. After the fence, WARP and RTX 4060 Laptop both read `0x77777777` from the guest shadow, and B had staged 65,536 bytes. Omitting only B's refresh for this control gives `0xcafebabe` on both adapters. Please cover the ordered two-list case along with the existing abandoned-list case. We should also exercise recording B first and then submitting A before B, because a recording-time lookup of pending writers would not cover that order.
Author
Owner

@⁠R0Y00 on GitHub · 2026-12-02 23:10 UTC · original

I also ran the other recording order on 73f3f639: record B's guest refresh and readback first, then record A's GPU write, then submit A before B in the same batch. WARP and RTX 4060 Laptop both read the stale 0x77777777 after the fence. With only B's refresh omitted, both read A's 0xcafebabe. A check for existing pending writers at B's record time cannot catch this order, so please include it when choosing where to guard the refresh.

**@⁠R0Y00** on GitHub · 2026-12-02 23:10 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3890#issuecomment-7361655778) I also ran the other recording order on `73f3f639`: record B's guest refresh and readback first, then record A's GPU write, then submit A before B in the same batch. WARP and RTX 4060 Laptop both read the stale `0x77777777` after the fence. With only B's refresh omitted, both read A's `0xcafebabe`. A check for existing pending writers at B's record time cannot catch this order, so please include it when choosing where to guard the refresh.
Author
Owner

@⁠R0Y00 on GitHub · 2026-12-03 08:06 UTC · original

Related verification on #3916 (9af44a3f): all 13 affected startup cases passed with refresh disabled. With the same binaries and X2W_COHERENT_PLACED_REFRESH=1, both WARP and RTX reproduced the key3 refusal-census mismatch at pixel (0,0) (0xff00ff00 vs 0xff000000). Once #3916 lands, please set that switch explicitly in the cross-list fixture and rerun both record/submit orders so the default-off path cannot mask the issue under review here.

**@⁠R0Y00** on GitHub · 2026-12-03 08:06 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3890#issuecomment-7371823043) Related verification on #3916 (`9af44a3f`): all 13 affected startup cases passed with refresh disabled. With the same binaries and `X2W_COHERENT_PLACED_REFRESH=1`, both WARP and RTX reproduced the key3 refusal-census mismatch at pixel `(0,0)` (`0xff00ff00` vs `0xff000000`). Once #3916 lands, please set that switch explicitly in the cross-list fixture and rerun both record/submit orders so the default-off path cannot mask the issue under review here.
Author
Owner

@⁠R0Y00 on GitHub · 2026-12-03 08:13 UTC · original

On main d2e6a4ed, the rebase conflicts are limited to the two refresh callers. Keep #3916’s default-off guard in both, then use this PR’s is_gpu_written(native, cmd_list) on the enabled path. I found no reader of the new pending write marks outside the two refresh callers and refresh_range, so the newly added record_gpu_write can also return early when refresh is disabled. The existing copy tracking should keep its current behavior. Please check the default-off regression suite alongside the opt-in cross-list cases.

**@⁠R0Y00** on GitHub · 2026-12-03 08:13 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3890#issuecomment-7371983984) On `main` `d2e6a4ed`, the rebase conflicts are limited to the two refresh callers. Keep #3916’s default-off guard in both, then use this PR’s `is_gpu_written(native, cmd_list)` on the enabled path. I found no reader of the new pending write marks outside the two refresh callers and `refresh_range`, so the newly added `record_gpu_write` can also return early when refresh is disabled. The existing copy tracking should keep its current behavior. Please check the default-off regression suite alongside the opt-in cross-list cases.
Author
Owner

@⁠Leyukaka on GitHub · 2026-12-03 09:35 UTC · original

Rebased on main (d2e6a4ed), new head ebb5df0b. I will force-push the branch: the history is rebased, your commit a0460f13 is kept with its authorship, and the merge commit is gone.

Conflicts. Only the two refresh callers, as you found. Both keep the #3916 guard first (refresh_enabled() in compute_root_srv_buffer, the && refresh_enabled() branch condition in indirect_table_buffer), then call is_gpu_written(native, cmd_list) on the enabled path.

Added on top

  • record_gpu_write returns before taking the list lock when the refresh is off, so no list entry is created and commit_lists commits nothing. The linear-buffer copy tracking is unchanged.
  • is_gpu_written(resource, list) now also checks the pending marks of every other live list. This covers the order where list A records the clear and list B, recorded later, would refresh. Reset, failed Close and release still drop A's mark. startup_coherent_placed_srv checks that list_b is refused while list_a holds the mark and refreshes after list_a is reset.
  • startup_indirect_translated_coherent_{warp,hardware} run the translated mode with X2W_COHERENT_PLACED_REFRESH=1 set by the test, and fail if the switch is not on, so the default-off path cannot mask the cases under review.
  • The existing translated tests follow the switch, so unset they cover the default: the never-written buffer and the unsubmitted-clear case are refused there, as before #3778.
  • The cross-list case (another guest list clears the table buffer and stays open while the draw is recorded) is refused in both modes.

Known limitation: your second order. B records its refresh before A records the write, and A is submitted first. This branch does not handle that case. The check runs when B records, before A's write exists. When A is submitted, B's copy is already in its closed list. Handling this would need a conditional or indirect copy, which is out of scope here. The X2W_COHERENT_PLACED_REFRESH row in docs/startup-runtime.md now describes the case. There is no fixture for it, because it would fail against the current code. With the switch off (the default) the case cannot happen, because nothing is refreshed.

Tests

Windows, MSVC, WARP and a hardware adapter: 32/32 passed in this set.

  • Default (switch unset or off): startup_indirect_translated_draw_{warp,hardware}, startup_indirect_translated_refusal_census_{warp,hardware,control_warp}, the eight startup_compute_* cases, startup_coherent_placed_srv_switch_off, startup_indirect_copy_provenance*, startup_clear_uav_*, startup_mesh86_material_backing*.
  • Opt-in (X2W_COHERENT_PLACED_REFRESH=1): startup_coherent_placed_srv_{warp,hardware}, startup_indirect_translated_coherent_{warp,hardware}.

A full-length application run with the switch unset also completed its 360 s window without a stall.

**@⁠Leyukaka** on GitHub · 2026-12-03 09:35 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3890#issuecomment-7373906718) Rebased on `main` (`d2e6a4ed`), new head `ebb5df0b`. I will force-push the branch: the history is rebased, your commit `a0460f13` is kept with its authorship, and the merge commit is gone. **Conflicts.** Only the two refresh callers, as you found. Both keep the #3916 guard first (`refresh_enabled()` in `compute_root_srv_buffer`, the `&& refresh_enabled()` branch condition in `indirect_table_buffer`), then call `is_gpu_written(native, cmd_list)` on the enabled path. **Added on top** - `record_gpu_write` returns before taking the list lock when the refresh is off, so no list entry is created and `commit_lists` commits nothing. The linear-buffer copy tracking is unchanged. - `is_gpu_written(resource, list)` now also checks the pending marks of every other live list. This covers the order where list A records the clear and list B, recorded later, would refresh. Reset, failed Close and release still drop A's mark. `startup_coherent_placed_srv` checks that `list_b` is refused while `list_a` holds the mark and refreshes after `list_a` is reset. - `startup_indirect_translated_coherent_{warp,hardware}` run the translated mode with `X2W_COHERENT_PLACED_REFRESH=1` set by the test, and fail if the switch is not on, so the default-off path cannot mask the cases under review. - The existing translated tests follow the switch, so unset they cover the default: the never-written buffer and the unsubmitted-clear case are refused there, as before #3778. - The cross-list case (another guest list clears the table buffer and stays open while the draw is recorded) is refused in both modes. **Known limitation: your second order.** B records its refresh before A records the write, and A is submitted first. This branch does not handle that case. The check runs when B records, before A's write exists. When A is submitted, B's copy is already in its closed list. Handling this would need a conditional or indirect copy, which is out of scope here. The `X2W_COHERENT_PLACED_REFRESH` row in `docs/startup-runtime.md` now describes the case. There is no fixture for it, because it would fail against the current code. With the switch off (the default) the case cannot happen, because nothing is refreshed. **Tests** Windows, MSVC, WARP and a hardware adapter: 32/32 passed in this set. - Default (switch unset or off): `startup_indirect_translated_draw_{warp,hardware}`, `startup_indirect_translated_refusal_census_{warp,hardware,control_warp}`, the eight `startup_compute_*` cases, `startup_coherent_placed_srv_switch_off`, `startup_indirect_copy_provenance*`, `startup_clear_uav_*`, `startup_mesh86_material_backing*`. - Opt-in (`X2W_COHERENT_PLACED_REFRESH=1`): `startup_coherent_placed_srv_{warp,hardware}`, `startup_indirect_translated_coherent_{warp,hardware}`. A full-length application run with the switch unset also completed its 360 s window without a stall.
github-bot force-pushed github-bot/gh-3890 from 73f3f639dd to ebb5df0b7e 2026-12-03 09:40:54 +00:00 Compare
Author
Owner

@⁠R0Y00 on GitHub · 2026-12-03 10:52 UTC · original

Independent MSVC Debug run at ebb5df0b on Windows build 26300, inbox WARP and RTX 4060 Laptop 32.0.16.1656. The 10 focused CTests passed without skips: startup_coherent_placed_srv (both adapters and switch-off), translated draw and refusal census (both adapters), explicit coherent-refresh (both adapters), and the WARP refusal-census mutation control.

The new tests cover a writer that is already recorded when the second list checks refresh, and a pending mark discarded by Reset. The remaining order in the review is still open on this head: record the refresh list first, record the writer second, then submit writer before refresh. The documentation now names that limitation. Please keep the default-off guard and leave the review open while the opt-in path can still overwrite a submitted GPU write in that order.

**@⁠R0Y00** on GitHub · 2026-12-03 10:52 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3890#issuecomment-7375889564) Independent MSVC Debug run at ebb5df0b on Windows build 26300, inbox WARP and RTX 4060 Laptop 32.0.16.1656. The 10 focused CTests passed without skips: startup_coherent_placed_srv (both adapters and switch-off), translated draw and refusal census (both adapters), explicit coherent-refresh (both adapters), and the WARP refusal-census mutation control. The new tests cover a writer that is already recorded when the second list checks refresh, and a pending mark discarded by Reset. The remaining order in the review is still open on this head: record the refresh list first, record the writer second, then submit writer before refresh. The documentation now names that limitation. Please keep the default-off guard and leave the review open while the opt-in path can still overwrite a submitted GPU write in that order.
With X2W_COHERENT_PLACED_REFRESH=1, list B can record a refresh before
list A records a GPU write to the same buffer. If A is submitted first,
in an earlier ExecuteCommandLists or earlier in the same one, a copy
recorded into B restores the guest bytes over A's write. The
record-time check cannot see this, because A's write did not exist yet.

The refresh no longer records its copy into the guest list. It keeps a
request on the list (resource, copy ranges, and the upload filled with
the guest bytes when the list records). In ExecuteCommandLists, in
submission order, each request runs from an internal list on the same
queue, executed just before its guest list, with the COMMON to
COPY_DEST barriers the guest list used to carry. A request is skipped
when a GPU write to its buffer was submitted earlier or comes from a
list placed before it in the same call: B then reads A's write, as the
guest submitted it. A skip is logged and counted, its page hashes are
not committed, and no guest list is dropped. The internal list and the
uploads are kept until the submission's fence.

Guest copies into a buffer also record a pending write mark, so a
submitted copy counts as an earlier write. The existing record-time
mark and the copy provenance tracking are unchanged. With the switch
off no list carries a request and nothing changes.
startup_coherent_placed_srv submits its lists as the runtime does:
each list's refresh copies run from an internal list just before it.
Section 7 records a refresh and a consumer copy on one list, then a GPU
write to the same buffer on another list. With the writer submitted
first, in the same ExecuteCommandLists or in an earlier one, the
refresh copy is skipped, the refreshing list still runs, its consumer
reads the written word, and the page hash is not committed; a
resubmission skips it again. With the refreshing list first, its copy
runs before it and the written word lands last.

The translated draw cases submit through a guest queue when the
refresh is on, so the copies run. Two cases record a UAV clear on
another list after the draw and submit it first, in the same call or an
earlier one: with the refresh on the draw's copy is skipped and the
draw shows the cleared value, and with it off the draw is refused at
record time. In both, the whole table buffer keeps the clear.
Author
Owner

@⁠Leyukaka on GitHub · 2026-12-03 11:33 UTC · original

Thank you for the independent run at ebb5df0b and for keeping the review open on the second order. That order (refresh list recorded first, writer recorded second, writer submitted first) is now decided at submission, on the opt-in path only. New head 7580ef80: two commits on top of ebb5df0b (8046aa33 runtime and docs, 7580ef80 tests). I will push the branch; ebb5df0b and the commits below it are unchanged.

Change

  • refresh_range no longer records its copy into the guest list. It keeps a request on the list: the resource, the copy ranges, and the upload filled with the guest bytes when the list records. The record-time refusals are unchanged (a write pending on any live list, a committed write, Reset, failed Close and release).
  • queue_execute calls x2w_coherent_placed::prepare_refreshes for each submission, after before_submit. In submission order, each list's requests run from an internal list created on the same queue and executed just before that list, in the same ExecuteCommandLists. The internal list carries the COMMON to COPY_DEST barriers the guest list used to carry.
  • A request is skipped when a GPU write to its buffer was submitted earlier, or comes from a list placed before it in the same call. The list then reads that write, which is what the guest submitted. A skip is logged (x2w-coherent-refresh skipped, first 8) and counted (x2w_d3d12_coherent_refresh_skips), and its page hashes are not committed. No guest list is dropped. A list submitted before the writer keeps its copy, so the write lands last.
  • If the internal list cannot be created or closed, its copies are skipped the same way (logged and counted, hashes not committed) and the guest list still runs.
  • The internal list, its allocator and the uploads are kept until the submission's fence, with the existing upload batches.
  • Guest copies into a buffer (CopyBufferRegion, CopyResource) now also record a pending write mark, so a submitted copy counts as an earlier write. Their record-time mark and the copy provenance tracking are unchanged.

Known difference. If one list refreshes the same buffer twice with different guest bytes in between, both copies now run before that list, so its earlier reads also see the later bytes.

Cost, with the switch on. Each submitted list that has refresh copies to run gets a new allocator and command list, created at that submission and released after its fence. There is no pooling yet.

Unchanged with the switch off (#3916 guard). No list carries a request, prepare_refreshes returns before taking a lock, and lists are submitted as before.

Docs. The X2W_COHERENT_PLACED_REFRESH row in docs/startup-runtime.md no longer lists this order as a known gap. It describes the submission-time copies, the skip and the known difference above.

Tests

  • startup_coherent_placed_srv_{warp,hardware} (switch on): the existing sections submit through the same preparation as the runtime. New section 7: one list records a refresh and a consumer copy, then another list records a GPU write to the same buffer. (a) Writer first in the same call: the copy is skipped, the refreshing list still runs, its consumer reads the written word, and the page hash is not committed. A resubmission skips it again. (b) Writer in an earlier call: same result. (c) Control, refreshing list first: its copy runs from the internal list placed just before it, the consumer reads the guest word, and the written word lands last.
  • startup_indirect_translated_coherent_{warp,hardware} (switch on): the refreshing cases submit through a guest queue. Two new cases record a UAV clear on another guest list after the draw and submit it first, in the same call or an earlier one. The draw's copy is skipped (one skip each), the draw shows the cleared value, and the table buffer keeps the clear.
  • startup_indirect_translated_draw_{warp,hardware} (switch unset): the same two cases refuse the draw at record time, skip nothing at submission, and keep the clear.

Validation

Windows, MSVC, WARP and a hardware adapter: 32/32 passed in the same focused set as before.

  • Default (switch unset or off): startup_indirect_translated_draw_{warp,hardware}, startup_indirect_translated_refusal_census_{warp,hardware,control_warp}, the eight startup_compute_* cases, startup_coherent_placed_srv_switch_off, startup_indirect_copy_provenance*, startup_clear_uav_*, startup_mesh86_material_backing*.
  • Opt-in (X2W_COHERENT_PLACED_REFRESH=1): startup_coherent_placed_srv_{warp,hardware} including the new section 7, and startup_indirect_translated_coherent_{warp,hardware}.

A full-length application run with the switch unset also completed its 360 s window without a stall.

**@⁠Leyukaka** on GitHub · 2026-12-03 11:33 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3890#issuecomment-7376859239) Thank you for the independent run at `ebb5df0b` and for keeping the review open on the second order. That order (refresh list recorded first, writer recorded second, writer submitted first) is now decided at submission, on the opt-in path only. New head `7580ef80`: two commits on top of `ebb5df0b` (`8046aa33` runtime and docs, `7580ef80` tests). I will push the branch; `ebb5df0b` and the commits below it are unchanged. **Change** - `refresh_range` no longer records its copy into the guest list. It keeps a request on the list: the resource, the copy ranges, and the upload filled with the guest bytes when the list records. The record-time refusals are unchanged (a write pending on any live list, a committed write, Reset, failed Close and release). - `queue_execute` calls `x2w_coherent_placed::prepare_refreshes` for each submission, after `before_submit`. In submission order, each list's requests run from an internal list created on the same queue and executed just before that list, in the same `ExecuteCommandLists`. The internal list carries the COMMON to COPY_DEST barriers the guest list used to carry. - A request is skipped when a GPU write to its buffer was submitted earlier, or comes from a list placed before it in the same call. The list then reads that write, which is what the guest submitted. A skip is logged (`x2w-coherent-refresh skipped`, first 8) and counted (`x2w_d3d12_coherent_refresh_skips`), and its page hashes are not committed. No guest list is dropped. A list submitted before the writer keeps its copy, so the write lands last. - If the internal list cannot be created or closed, its copies are skipped the same way (logged and counted, hashes not committed) and the guest list still runs. - The internal list, its allocator and the uploads are kept until the submission's fence, with the existing upload batches. - Guest copies into a buffer (`CopyBufferRegion`, `CopyResource`) now also record a pending write mark, so a submitted copy counts as an earlier write. Their record-time mark and the copy provenance tracking are unchanged. **Known difference.** If one list refreshes the same buffer twice with different guest bytes in between, both copies now run before that list, so its earlier reads also see the later bytes. **Cost, with the switch on.** Each submitted list that has refresh copies to run gets a new allocator and command list, created at that submission and released after its fence. There is no pooling yet. **Unchanged with the switch off (#3916 guard).** No list carries a request, `prepare_refreshes` returns before taking a lock, and lists are submitted as before. **Docs.** The `X2W_COHERENT_PLACED_REFRESH` row in `docs/startup-runtime.md` no longer lists this order as a known gap. It describes the submission-time copies, the skip and the known difference above. **Tests** - `startup_coherent_placed_srv_{warp,hardware}` (switch on): the existing sections submit through the same preparation as the runtime. New section 7: one list records a refresh and a consumer copy, then another list records a GPU write to the same buffer. (a) Writer first in the same call: the copy is skipped, the refreshing list still runs, its consumer reads the written word, and the page hash is not committed. A resubmission skips it again. (b) Writer in an earlier call: same result. (c) Control, refreshing list first: its copy runs from the internal list placed just before it, the consumer reads the guest word, and the written word lands last. - `startup_indirect_translated_coherent_{warp,hardware}` (switch on): the refreshing cases submit through a guest queue. Two new cases record a UAV clear on another guest list after the draw and submit it first, in the same call or an earlier one. The draw's copy is skipped (one skip each), the draw shows the cleared value, and the table buffer keeps the clear. - `startup_indirect_translated_draw_{warp,hardware}` (switch unset): the same two cases refuse the draw at record time, skip nothing at submission, and keep the clear. **Validation** Windows, MSVC, WARP and a hardware adapter: 32/32 passed in the same focused set as before. - Default (switch unset or off): `startup_indirect_translated_draw_{warp,hardware}`, `startup_indirect_translated_refusal_census_{warp,hardware,control_warp}`, the eight `startup_compute_*` cases, `startup_coherent_placed_srv_switch_off`, `startup_indirect_copy_provenance*`, `startup_clear_uav_*`, `startup_mesh86_material_backing*`. - Opt-in (`X2W_COHERENT_PLACED_REFRESH=1`): `startup_coherent_placed_srv_{warp,hardware}` including the new section 7, and `startup_indirect_translated_coherent_{warp,hardware}`. A full-length application run with the switch unset also completed its 360 s window without a stall.
Author
Owner

@⁠R0Y00 on GitHub · 2026-12-03 11:59 UTC · original

I independently rebuilt 7580ef80 in MSVC Debug on Windows build 26300. The 10 targeted tests all passed on inbox WARP and RTX 4060 Laptop, including reversed recording/submission order, default-off, and the refusal-census control. There were no skips.

I also reproduced the disclosed same-list limitation with the source-built startup_coherent_placed_srv fixture. In one list, refresh [0,4) on a fresh page containing 0x12345678 and copy the first word to readback. Change the guest word to 0x89abcdef, refresh [4,8) so the updated 64 KiB page is staged again, then copy the first word to a separate readback offset. After the fence, both adapters returned 0x89abcdef for both reads. The first should still observe 0x12345678. Please keep the cross-list fix and preserve the refresh point inside the guest list, or explicitly refuse a conflicting second snapshot before it can silently change the first read. The current docs and tests make clear that the default-off path stays covered.

**@⁠R0Y00** on GitHub · 2026-12-03 11:59 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3890#issuecomment-7377456930) I independently rebuilt 7580ef80 in MSVC Debug on Windows build 26300. The 10 targeted tests all passed on inbox WARP and RTX 4060 Laptop, including reversed recording/submission order, default-off, and the refusal-census control. There were no skips. I also reproduced the disclosed same-list limitation with the source-built startup_coherent_placed_srv fixture. In one list, refresh [0,4) on a fresh page containing 0x12345678 and copy the first word to readback. Change the guest word to 0x89abcdef, refresh [4,8) so the updated 64 KiB page is staged again, then copy the first word to a separate readback offset. After the fence, both adapters returned 0x89abcdef for both reads. The first should still observe 0x12345678. Please keep the cross-list fix and preserve the refresh point inside the guest list, or explicitly refuse a conflicting second snapshot before it can silently change the first read. The current docs and tests make clear that the default-off path stays covered.
The refresh copies of a list now run before that list, so a list can
hold only one snapshot of each 64 KiB page. When the guest changes a
page after the list staged it for one read and the list then refreshes
the same page for another read, both copies ran before the list, and
the first read saw the later bytes.

refresh_range now refuses the later consumer instead, with
RefreshRefusal::conflicting_snapshot, counted: when the list already
staged the page with other bytes, when it read the page clean from the
backing and the page now needs a copy, or when a range the list already
covers no longer matches the bytes it staged or relied on. The earlier
read keeps its bytes. Unchanged bytes still share the staged page. The
draw input and compute root SRV callers refuse with a reason naming the
change. The order-2 handling at submission is unchanged.
startup_coherent_placed_srv section 8 follows the review case: one list
refreshes [0, 4) of a fresh page holding 0x12345678 and reads it, the
guest changes the word to 0x89abcdef, and the list refreshes [4, 8) for
a second read. The second refresh is refused as a conflicting snapshot
and counted. With the word restored, [8, 12) shares the staged page
without a copy. After submission the first read and the backing hold
0x12345678.
Author
Owner

@⁠Leyukaka on GitHub · 2026-12-03 13:19 UTC · original

Thank you for the reproduction. A conflicting second snapshot in one list is now refused when it is recorded, so it can no longer change the first read. New head ea0d9b05: two commits on top of 7580ef80 (1abb4c8b runtime and docs, ea0d9b05 test). The cross-list fix and the order-2 handling at submission are unchanged.

Change

All of a list's refresh copies run before that list, so a list holds one snapshot of each 64 KiB page. refresh_range now refuses a later consumer in the same list (RefreshRefusal::conflicting_snapshot, counted) when a page changed in guest memory since the list copied or read it:

  • the list already staged the page and the guest bytes now differ;
  • the list read the page clean from the backing and the page now needs a copy;
  • the range is already covered by an earlier refresh of the list, but a page no longer matches the bytes the list staged or relied on.

The first snapshot is kept, so the earlier read keeps its bytes. Identical bytes share the snapshot and add no copy. The draw input and compute root SRV callers refuse with a specific reason: ... changed in guest memory after its list refreshed it for an earlier read. Nothing changes with the switch off.

Docs. The X2W_COHERENT_PLACED_REFRESH row in docs/startup-runtime.md replaces the known difference with this rule.

Test

startup_coherent_placed_srv_{warp,hardware} (switch on), new section 8, follows your scenario:

  1. One list refreshes [0, 4) of a fresh page holding 0x12345678 and copies the first word to readback.
  2. The guest word changes to 0x89abcdef and the list refreshes [4, 8) for a second consumer. That refresh is refused as a conflicting snapshot and counted.
  3. With the word restored, [8, 12) shares the staged page without a copy.
  4. After submission, the first read and the backing both hold 0x12345678.

Validation

Windows, MSVC, WARP and a hardware adapter: 32/32 passed in the same focused set as before, including section 8 of startup_coherent_placed_srv on both adapters and startup_coherent_placed_srv_switch_off.

**@⁠Leyukaka** on GitHub · 2026-12-03 13:19 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3890#issuecomment-7379637841) Thank you for the reproduction. A conflicting second snapshot in one list is now refused when it is recorded, so it can no longer change the first read. New head `ea0d9b05`: two commits on top of `7580ef80` (`1abb4c8b` runtime and docs, `ea0d9b05` test). The cross-list fix and the order-2 handling at submission are unchanged. **Change** All of a list's refresh copies run before that list, so a list holds one snapshot of each 64 KiB page. `refresh_range` now refuses a later consumer in the same list (`RefreshRefusal::conflicting_snapshot`, counted) when a page changed in guest memory since the list copied or read it: - the list already staged the page and the guest bytes now differ; - the list read the page clean from the backing and the page now needs a copy; - the range is already covered by an earlier refresh of the list, but a page no longer matches the bytes the list staged or relied on. The first snapshot is kept, so the earlier read keeps its bytes. Identical bytes share the snapshot and add no copy. The draw input and compute root SRV callers refuse with a specific reason: `... changed in guest memory after its list refreshed it for an earlier read`. Nothing changes with the switch off. **Docs.** The `X2W_COHERENT_PLACED_REFRESH` row in `docs/startup-runtime.md` replaces the known difference with this rule. **Test** `startup_coherent_placed_srv_{warp,hardware}` (switch on), new section 8, follows your scenario: 1. One list refreshes `[0, 4)` of a fresh page holding `0x12345678` and copies the first word to readback. 2. The guest word changes to `0x89abcdef` and the list refreshes `[4, 8)` for a second consumer. That refresh is refused as a conflicting snapshot and counted. 3. With the word restored, `[8, 12)` shares the staged page without a copy. 4. After submission, the first read and the backing both hold `0x12345678`. **Validation** Windows, MSVC, WARP and a hardware adapter: 32/32 passed in the same focused set as before, including section 8 of `startup_coherent_placed_srv` on both adapters and `startup_coherent_placed_srv_switch_off`.
Author
Owner

@⁠R0Y00 on GitHub · 2026-12-03 13:42 UTC · original

I independently rebuilt ea0d9b05 with Windows MSVC Debug and ran ctest --preset dev --no-tests=error -j 1 -V -R '^startup_coherent_placed_srv_(warp|hardware)$'. Both WARP and RTX passed, including the conflicting snapshot refusal and preservation of the first read. I also independently reproduced the two remaining CI regressions on this head:

  • Both new compute refresh messages are missing from COMPUTE_DISPATCH_REASONS, which breaks startup_triage_run_check.py on Linux and startup_triage_run on Windows.
  • The stand-in catalog contains 86 d3d12_xs entries and standin_exports_check.py expects 85.

Please register both reasons and reconcile the export inventory with current main. The GPU fixture result is good, and the two CI checks still need to pass on the revised head.

**@⁠R0Y00** on GitHub · 2026-12-03 13:42 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3890#issuecomment-7380238264) I independently rebuilt ea0d9b05 with Windows MSVC Debug and ran `ctest --preset dev --no-tests=error -j 1 -V -R '^startup_coherent_placed_srv_(warp|hardware)$'`. Both WARP and RTX passed, including the conflicting snapshot refusal and preservation of the first read. I also independently reproduced the two remaining CI regressions on this head: - Both new compute refresh messages are missing from COMPUTE_DISPATCH_REASONS, which breaks startup_triage_run_check.py on Linux and startup_triage_run on Windows. - The stand-in catalog contains 86 d3d12_xs entries and standin_exports_check.py expects 85. Please register both reasons and reconcile the export inventory with current main. The GPU fixture result is good, and the two CI checks still need to pass on the revised head.
github-bot force-pushed github-bot/gh-3890 from ea0d9b050f to 57d2968a61 2026-12-03 14:21:43 +00:00 Compare
Author
Owner

@⁠Leyukaka on GitHub · 2026-12-03 14:18 UTC · original

Both CI regressions are fixed in 57d2968a. The branch was rebased onto current main (7b3212a9) without conflicts, so it is force-pushed.

  • COMPUTE_DISPATCH_REASONS (tools/startup/triage_run.py) now lists the two refusal reasons for a page that changed after its list refreshed it: a compute root SRV changed in guest memory after its list refreshed it for an earlier read (compute) and an input changed in guest memory after its list refreshed it for an earlier read (draw).
  • The branch adds one stand-in export, x2w_d3d12_coherent_refresh_skips. With main's Mesh86 upload export, d3d12_xs now has 87 entries, 52 of them unmeasured. standin_exports_check.py pins the new entry's source to its dllexport line, as #3887 did for the Mesh86 export.

Validation

Windows, MSVC, WARP and a hardware adapter: 35/35 passed in the focused set.

  • The two CI checks: standin_exports_check, startup_triage_run, startup_triage_run_cli_check.
  • Opt-in (X2W_COHERENT_PLACED_REFRESH=1): startup_coherent_placed_srv_{warp,hardware}.
  • Default (switch unset or off): the indirect and compute regression tests.
**@⁠Leyukaka** on GitHub · 2026-12-03 14:18 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3890#issuecomment-7381225557) Both CI regressions are fixed in `57d2968a`. The branch was rebased onto current `main` (`7b3212a9`) without conflicts, so it is force-pushed. - `COMPUTE_DISPATCH_REASONS` (`tools/startup/triage_run.py`) now lists the two refusal reasons for a page that changed after its list refreshed it: `a compute root SRV changed in guest memory after its list refreshed it for an earlier read` (compute) and `an input changed in guest memory after its list refreshed it for an earlier read` (draw). - The branch adds one stand-in export, `x2w_d3d12_coherent_refresh_skips`. With `main`'s Mesh86 upload export, `d3d12_xs` now has 87 entries, 52 of them unmeasured. `standin_exports_check.py` pins the new entry's source to its `dllexport` line, as #3887 did for the Mesh86 export. **Validation** Windows, MSVC, WARP and a hardware adapter: 35/35 passed in the focused set. - The two CI checks: `standin_exports_check`, `startup_triage_run`, `startup_triage_run_cli_check`. - Opt-in (`X2W_COHERENT_PLACED_REFRESH=1`): `startup_coherent_placed_srv_{warp,hardware}`. - Default (switch unset or off): the indirect and compute regression tests.
Author
Owner

@⁠R0Y00 on GitHub · 2026-12-03 14:43 UTC · original

Windows and Linux CI are green at 57d2968a. A trial merge against main adfc0d94 conflicts in tests/startup_indirect_draw_indexed.cpp after #3937. Please preserve the snapshot_stale corruption before Submit and snapshot_index in the translated-indexed selector alongside the coherent refresh controls. The runtime source merges cleanly. Rerun both the coherent placed SRV and translated indexed snapshot checks on the refreshed head.

**@⁠R0Y00** on GitHub · 2026-12-03 14:43 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3890#issuecomment-7381920492) Windows and Linux CI are green at 57d2968a. A trial merge against main adfc0d94 conflicts in tests/startup_indirect_draw_indexed.cpp after #3937. Please preserve the snapshot_stale corruption before Submit and snapshot_index in the translated-indexed selector alongside the coherent refresh controls. The runtime source merges cleanly. Rerun both the coherent placed SRV and translated indexed snapshot checks on the refreshed head.
github-bot force-pushed github-bot/gh-3890 from 57d2968a61 to ed89d267c1 2026-12-03 15:22:36 +00:00 Compare
Author
Owner

@⁠Leyukaka on GitHub · 2026-12-03 15:17 UTC · original

Rebased on main (adfc0d94), new head ed89d267. The history is rebased again, so I will force-push. Your commit is kept with its authorship. The runtime source merged without conflicts.

Conflicts. Both were in tests/startup_indirect_draw_indexed.cpp. Each side's lines are kept as they are:

  • Mode selector: translated_indexed keeps snapshot_index from #3937. The translated-coherent mode and the X2W_COHERENT_PLACED_REFRESH check follow it unchanged.
  • Before Close and Submit in run(): the snapshot_stale corruption (0x4d) runs first. The UAV clear recorded on another list after the draw (writer_recorded_after_draw) comes after it. Both still run before any list is closed or submitted.

Validation

On Windows (MSVC), WARP and a hardware adapter, on the rebased head: 37/37 passed in the focused set, including startup_indirect_translated_indexed_snapshot_{warp,hardware} from #3937, startup_coherent_placed_srv_{warp,hardware,switch_off}, startup_indirect_translated_coherent_{warp,hardware}, the default-off indirect and compute regression tests, startup_triage_run and standin_exports_check.

  • #3937: startup_indirect_translated_indexed_snapshot_{warp,hardware}.
  • Coherent placed SRV: startup_coherent_placed_srv_{warp,hardware} (switch on) and startup_coherent_placed_srv_switch_off.
  • Coherent translated draw: startup_indirect_translated_coherent_{warp,hardware}.
  • Default path: startup_indirect_translated_draw_{warp,hardware}, startup_indirect_translated_refusal_census_{warp,hardware,control_warp}, startup_compute_{dispatch_input,input_view_token,root_srv_dispatch,snapshot_order}_{warp,hardware}.
  • CI checks: startup_triage_run, runtime_startup_triage_run_cli_check, standin_exports_check.
**@⁠Leyukaka** on GitHub · 2026-12-03 15:17 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/3890#issuecomment-7382885870) Rebased on `main` (`adfc0d94`), new head `ed89d267`. The history is rebased again, so I will force-push. Your commit is kept with its authorship. The runtime source merged without conflicts. **Conflicts.** Both were in `tests/startup_indirect_draw_indexed.cpp`. Each side's lines are kept as they are: - Mode selector: `translated_indexed` keeps `snapshot_index` from #3937. The `translated-coherent` mode and the `X2W_COHERENT_PLACED_REFRESH` check follow it unchanged. - Before Close and Submit in `run()`: the `snapshot_stale` corruption (`0x4d`) runs first. The UAV clear recorded on another list after the draw (`writer_recorded_after_draw`) comes after it. Both still run before any list is closed or submitted. **Validation** On Windows (MSVC), WARP and a hardware adapter, on the rebased head: 37/37 passed in the focused set, including startup_indirect_translated_indexed_snapshot_{warp,hardware} from #3937, startup_coherent_placed_srv_{warp,hardware,switch_off}, startup_indirect_translated_coherent_{warp,hardware}, the default-off indirect and compute regression tests, startup_triage_run and standin_exports_check. - #3937: `startup_indirect_translated_indexed_snapshot_{warp,hardware}`. - Coherent placed SRV: `startup_coherent_placed_srv_{warp,hardware}` (switch on) and `startup_coherent_placed_srv_switch_off`. - Coherent translated draw: `startup_indirect_translated_coherent_{warp,hardware}`. - Default path: `startup_indirect_translated_draw_{warp,hardware}`, `startup_indirect_translated_refusal_census_{warp,hardware,control_warp}`, `startup_compute_{dispatch_input,input_view_token,root_srv_dispatch,snapshot_order}_{warp,hardware}`. - CI checks: `startup_triage_run`, `runtime_startup_triage_run_cli_check`, `standin_exports_check`.
This pull request has changes conflicting with the target branch.
  • src/startup_stubs/d3d12_compute_dispatch.inl
  • src/startup_stubs/d3d12_xs_device.cpp
  • src/startup_stubs/list_copy.inl
  • tests/standin_exports_check.py
  • tests/startup_indirect_draw_indexed.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/3892/head:github-bot/gh-3890'
git switch 'github-bot/gh-3890'

Merge

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