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

Open
Leyukaka wants to merge 12 commits from upstream-pr/3890 into main
Leyukaka commented 2026-12-02 21:00:53 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-12-02T21:00:53Z.


Fixes the main regression from #3776. 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 #3776, 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 #3776.

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.
<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:5614628730 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3890). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-12-02T21:00:53Z. --- Fixes the main regression from #3776. 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 #3776, `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 #3776. 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.
R0Y00 commented 2026-12-02 21:12:06 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-02T21:12:06Z.

Review: CHANGES_REQUESTED


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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6159100640 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3890#pullrequestreview-6159100640). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-12-02T21:12:06Z. **Review:** CHANGES_REQUESTED --- 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 commented 2026-12-02 21:29:01 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-02T21:29:01Z.

Review: COMMENTED


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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6159342287 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3890#pullrequestreview-6159342287). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-12-02T21:29:01Z. **Review:** COMMENTED --- 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.
Leyukaka commented 2026-12-02 21:56:25 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-12-02T21:56:25Z.


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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7359998713 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3890#issuecomment-7359998713). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-12-02T21:56:25Z. --- 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.
R0Y00 commented 2026-12-02 22:55:14 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-02T22:55:14Z.

Review: COMMENTED


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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6160497617 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3890#pullrequestreview-6160497617). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-12-02T22:55:14Z. **Review:** COMMENTED --- 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 commented 2026-12-02 23:10:24 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-02T23:10:24Z.


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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7361655778 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3890#issuecomment-7361655778). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-12-02T23:10:24Z. --- 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 commented 2026-12-03 08:06:07 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-03T08:06:07Z.


Related verification on #3914 (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 #3914 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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7371823043 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3890#issuecomment-7371823043). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-12-03T08:06:07Z. --- Related verification on #3914 (`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 #3914 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 commented 2026-12-03 08:13:24 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-03T08:13:24Z.


On main d2e6a4ed, the rebase conflicts are limited to the two refresh callers. Keep #3914’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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7371983984 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3890#issuecomment-7371983984). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-12-03T08:13:24Z. --- On `main` `d2e6a4ed`, the rebase conflicts are limited to the two refresh callers. Keep #3914’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.
Leyukaka commented 2026-12-03 09:35:30 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-12-03T09:35:30Z.


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 #3914 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 #3776.
  • 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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7373906718 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3890#issuecomment-7373906718). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-12-03T09:35:30Z. --- 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 #3914 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 #3776. - 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.
R0Y00 commented 2026-12-03 10:52:18 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-03T10:52:18Z.


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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7375889564 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3890#issuecomment-7375889564). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-12-03T10:52:18Z. --- 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.
Leyukaka commented 2026-12-03 11:33:16 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-12-03T11:33:16Z.


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 (#3914 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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7376859239 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3890#issuecomment-7376859239). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-12-03T11:33:16Z. --- 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 (#3914 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.
R0Y00 commented 2026-12-03 11:59:37 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-03T11:59:37Z.


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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7377456930 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3890#issuecomment-7377456930). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-12-03T11:59:37Z. --- 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.
Leyukaka commented 2026-12-03 13:19:14 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-12-03T13:19:14Z.


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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7379637841 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3890#issuecomment-7379637841). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-12-03T13:19:14Z. --- 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`.
R0Y00 commented 2026-12-03 13:42:11 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-03T13:42:11Z.


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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7380238264 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3890#issuecomment-7380238264). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-12-03T13:42:11Z. --- 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.
Leyukaka commented 2026-12-03 14:18:22 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-12-03T14:18:22Z.


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 #3885 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.
<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7381225557 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3890#issuecomment-7381225557). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-12-03T14:18:22Z. --- 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 #3885 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.
R0Y00 commented 2026-12-03 14:43:23 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-03T14:43:23Z.


Windows and Linux CI are green at 57d2968a. A trial merge against main adfc0d94 conflicts in tests/startup_indirect_draw_indexed.cpp after #3935. 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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7381920492 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3890#issuecomment-7381920492). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-12-03T14:43:23Z. --- Windows and Linux CI are green at 57d2968a. A trial merge against main adfc0d94 conflicts in tests/startup_indirect_draw_indexed.cpp after #3935. 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.
Leyukaka commented 2026-12-03 15:17:18 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-12-03T15:17:18Z.


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 #3935. 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 #3935, 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.

  • #3935: 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.
<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7382885870 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3890#issuecomment-7382885870). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-12-03T15:17:18Z. --- 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 #3935. 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 #3935, 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. - #3935: `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 cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/3890:upstream-pr/3890'
git switch 'upstream-pr/3890'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/3890'
git switch 'upstream-pr/3890'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/3890'
git switch 'upstream-pr/3890'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/3890'
git switch 'main'
git merge --squash 'upstream-pr/3890'
git switch 'main'
git merge --ff-only 'upstream-pr/3890'
git switch 'main'
git merge 'upstream-pr/3890'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
R0Y00/Xbox2Windows!3890
No description provided.