startup: opt-in inline descriptors (X2W_D3D12_INLINE_DESCRIPTORS) #3429

Merged
lukaslw-lab merged 2 commits from upstream-pr/3429 into main 2026-11-29 07:39:15 +00:00
lukaslw-lab commented 2026-11-29 01:38:03 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by lukaslw-lab on 2026-11-29T01:38:03Z.


Change

Fixes #3428 (every constant buffer view and descriptor copy goes through the stand-in).

X2W_D3D12_INLINE_DESCRIPTORS=1 (opt-in): wrap() leaves byte +0x18 of the guest device at 0, so the title writes
constant buffer views and copies CBV/SRV/UAV descriptors itself instead of calling slots 17 and 24; sampler copies
still arrive through slot 24.

  • Retirement: with copies made in title memory, retire_view_refs no longer counts every descriptor that names a
    resource. Under the switch the retire drain skips that check, so a retired resource is freed once its release fences
    pass and no recorded list or submission holds it. Wrappers are never freed (only the desktop object is), so a token
    that names a freed resource finds the dead wrapper and binds null, never another resource.
  • Unset: the byte is set as since #3211 and retirement waits for retire_view_refs.
  • startup_indirect_dispatch checks the byte (#3211); it now expects 0 when the switch is set.
  • Fixture-only export x2w_d3d12_token_texture: what a draw binds for a texture token (record id, as_wrapper,
    sampled_address_texture). Switch row and section "D3D12 inline descriptors" in docs/startup-runtime.md.
  • Why opt-in: it changes who writes descriptors and when retired textures are freed. Same reasoning as #2949, #2977,
    #3028.

Verification

Windows 10 22H2, i7-4790K, RTX 3080 Ti (NVIDIA 32.0.16.1047) and WARP; release; commit 9d49b8c2 on main 212d4b5f.

ctest --preset release --no-tests=error -R '^(startup_inline_retire_|startup_indirect_|startup_resource_retire|startup_view_)' --output-on-failure
  • New startup_inline_retire_{on,control}_{warp,hardware}:
    1. a texture with a view and a 32-byte copy of its token made with memcpy: with the switch it is freed at its
      fences, and both descriptors then bind null; in the control the live slot holds it until overwritten, and the
      copy then binds null;
    2. 64 new textures never get the freed wrapper's address, and the copy still binds null;
    3. behind a closed gate fence nothing is freed until the gate opens;
    4. a live texture with a copy stays.
  • New startup_indirect_{dispatch,constants,count}_inline_{warp,hardware}: byte +0x18 stays 0 and the indirect
    dispatch cases pass.
  • Mutant (local): the drain keeps the retire_view_refs check under the switch →
    startup_inline_retire_on_{warp,hardware} fail with T1 not freed at its fences with inline descriptors; the
    controls pass.
  • This head, release: 136/136 in the families above, 17 capability skips as on main (WARP mesh cases,
    startup_view_heap_warp).
  • tests/docs_links_check.py: passed.

Startup run of the main executable (#870), this head, release, warm shader cache, scripted input, merged switches
(#2949, #2977, #3028, #3313) and X2W_D3D12_BUDGET=1 X2W_D3D12_RELEASE_RETIRED=1 in every run, 250 s, order
off/on/on/off:

loaded blocks 75–100k 100–125k 125–150k 150–175k 175–200k
fps, unset 11.0 / 12.5 13.1 / 13.9 12.6 / 12.2 9.4 / 10.0 7.4 / 9.1
fps, set 16.1 / 16.4 16.3 / 16.1 14.6 / 13.6 12.5 / 11.2 10.3 / –
title CPU ms per frame, unset 359 / 297 320 / 328 410 / 391 476 / 465 542 / 496
title CPU ms per frame, set 276 / 218 290 / 258 315 / 339 380 / 392 437 / –
  • Every set run is faster than every unset run in every window (one set run did not reach 175k).
  • Null bindings per 1,000 translated draws: token 19.5 / 22.6 unset, 21.4 / 22.0 set; wrapper 0.26 / 0.31 unset,
    0.36 / 0.24 set. Retained textures peak 0.25 / 0.21 GB unset, 0.31 / 0.16 GB set. Refusal lines 83 / 84 vs 85 / 85.
    No device removal.
  • With a local lock-counter build (not part of this change), slot 24 copies in one 250 s run fell from ~10.6 million
    to 54.
  • Without retirement at the fences (the byte alone), retained textures grew to 2.2 GB in one local run, which is why
    the switch also changes the drain.

Not covered: other adapters, hosts with more cores, Wine.

AI-assisted: the change, tests and this description were written with Claude; I ran the startup comparison.

🤖 Generated with Claude Code

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:5546493563 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3429). Originally posted by [lukaslw-lab](https://github.com/lukaslw-lab) on 2026-11-29T01:38:03Z. --- ## Change Fixes #3428 (every constant buffer view and descriptor copy goes through the stand-in). `X2W_D3D12_INLINE_DESCRIPTORS=1` (opt-in): `wrap()` leaves byte +0x18 of the guest device at 0, so the title writes constant buffer views and copies CBV/SRV/UAV descriptors itself instead of calling slots 17 and 24; sampler copies still arrive through slot 24. - Retirement: with copies made in title memory, `retire_view_refs` no longer counts every descriptor that names a resource. Under the switch the retire drain skips that check, so a retired resource is freed once its release fences pass and no recorded list or submission holds it. Wrappers are never freed (only the desktop object is), so a token that names a freed resource finds the dead wrapper and binds null, never another resource. - Unset: the byte is set as since #3211 and retirement waits for `retire_view_refs`. - `startup_indirect_dispatch` checks the byte (#3211); it now expects 0 when the switch is set. - Fixture-only export `x2w_d3d12_token_texture`: what a draw binds for a texture token (record id, `as_wrapper`, `sampled_address_texture`). Switch row and section "D3D12 inline descriptors" in `docs/startup-runtime.md`. - Why opt-in: it changes who writes descriptors and when retired textures are freed. Same reasoning as #2949, #2977, #3028. ## Verification Windows 10 22H2, i7-4790K, RTX 3080 Ti (NVIDIA 32.0.16.1047) and WARP; release; commit `9d49b8c2` on `main` `212d4b5f`. ``` ctest --preset release --no-tests=error -R '^(startup_inline_retire_|startup_indirect_|startup_resource_retire|startup_view_)' --output-on-failure ``` - New `startup_inline_retire_{on,control}_{warp,hardware}`: 1. a texture with a view and a 32-byte copy of its token made with `memcpy`: with the switch it is freed at its fences, and both descriptors then bind null; in the control the live slot holds it until overwritten, and the copy then binds null; 2. 64 new textures never get the freed wrapper's address, and the copy still binds null; 3. behind a closed gate fence nothing is freed until the gate opens; 4. a live texture with a copy stays. - New `startup_indirect_{dispatch,constants,count}_inline_{warp,hardware}`: byte +0x18 stays 0 and the indirect dispatch cases pass. - Mutant (local): the drain keeps the `retire_view_refs` check under the switch → `startup_inline_retire_on_{warp,hardware}` fail with `T1 not freed at its fences with inline descriptors`; the controls pass. - This head, release: 136/136 in the families above, 17 capability skips as on `main` (WARP mesh cases, `startup_view_heap_warp`). - `tests/docs_links_check.py`: passed. Startup run of the main executable (#870), this head, release, warm shader cache, scripted input, merged switches (#2949, #2977, #3028, #3313) and `X2W_D3D12_BUDGET=1 X2W_D3D12_RELEASE_RETIRED=1` in every run, 250 s, order off/on/on/off: | loaded blocks | 75–100k | 100–125k | 125–150k | 150–175k | 175–200k | |---|---|---|---|---|---| | fps, unset | 11.0 / 12.5 | 13.1 / 13.9 | 12.6 / 12.2 | 9.4 / 10.0 | 7.4 / 9.1 | | fps, set | 16.1 / 16.4 | 16.3 / 16.1 | 14.6 / 13.6 | 12.5 / 11.2 | 10.3 / – | | title CPU ms per frame, unset | 359 / 297 | 320 / 328 | 410 / 391 | 476 / 465 | 542 / 496 | | title CPU ms per frame, set | 276 / 218 | 290 / 258 | 315 / 339 | 380 / 392 | 437 / – | - Every set run is faster than every unset run in every window (one set run did not reach 175k). - Null bindings per 1,000 translated draws: `token` 19.5 / 22.6 unset, 21.4 / 22.0 set; `wrapper` 0.26 / 0.31 unset, 0.36 / 0.24 set. Retained textures peak 0.25 / 0.21 GB unset, 0.31 / 0.16 GB set. Refusal lines 83 / 84 vs 85 / 85. No device removal. - With a local lock-counter build (not part of this change), slot 24 copies in one 250 s run fell from ~10.6 million to 54. - Without retirement at the fences (the byte alone), retained textures grew to 2.2 GB in one local run, which is why the switch also changes the drain. Not covered: other adapters, hosts with more cores, Wine. AI-assisted: the change, tests and this description were written with Claude; I ran the startup comparison. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Leyukaka commented 2026-11-29 02:51:13 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-29T02:51:13Z.

Review: CHANGES_REQUESTED


Changes requested at 9d49b8c2. Read the diff and the surrounding code on main 212d4b5f; nothing built or run, so the race below is found by reading, not reproduced.

Release vs. draw race. With the switch, the drain frees a retired texture while descriptors still name it, and a draw that reaches such a descriptor is the expected case (it should bind null). That draw can instead record the texture while the drain frees it:

  • drain_retired_resources claims the wrapper and sets own().real = nullptr under retire_lock only (d3d12_xs_device.cpp:6300-6302). It takes draw_lock later, only around texture_uploads().erase (:6337-6339), and calls Release() after dropping it (:6340).
  • draw_translated holds draw_lock from d3d12_draw.inl:2883 to the end of the call. It reads texture = sampled_address_texture(resource) at :3114 (a plain read of own().real, d3d12_memory_srv.inl:583, no retire_lock), then runs upload_texture (:3151), require_state (:3153) and only then retire_hold (:3154).
  • If the drain clears real between :3114 and :3154, retire_hold reads null under retire_lock (:6131), holds nothing and sets retire_hold_missed (:6152) on a wrapper that already left retired_resources. The draw keeps its local texture: the transition is already recorded and CreateShaderResourceView(texture, ...) follows at :3195.
  • draw_lock does not close the window. It only delays the drain's Release() until the draw call returns; the list is still open and unsubmitted, and nothing holds the desktop object unless an earlier draw of the same list did.
  • The drain runs at the top of queue_execute (:4776) and queue_present (:7568), before either takes draw_lock, so it needs one thread recording while another submits or presents.

On main the drain skips a texture while any tracked slot names it (retire_view_refs > 0), so a draw can only get there through an uncounted descriptor. With the switch no copy is counted and the check is skipped (:6291).

Possible fix: take the hold before the first use (right after :3114, ahead of upload_texture and require_state), have retire_hold report that it found real cleared, and bind null in that case. native_mesh57.inl:122/188-189 has the same read, use, hold order. The compute path reads real at d3d12_compute_dispatch.inl:690 and takes no hold at all. startup_inline_retire does not reach any of this: it resolves tokens through x2w_d3d12_token_texture on one thread.

Smaller points:

  • X2W_D3D12_RETIRE_REASONS (:6479) still reports a queued resource with retire_view_refs > 0 as view_refs. With the switch the drain no longer waits on view refs.
  • #3377 (open) replaces the words[1] < view_records().size() decodes with token_view(). x2w_d3d12_token_texture (:6610-6613) adds one more of the old decodes, so whichever PR merges second has to convert it.
  • PR CI runs none of the new tests. startup_inline_retire is not a target of the pr build preset, and the pr test filter startup_indirect_(dispatch|...)_warp matches neither startup_indirect_*_inline_warp nor startup_inline_retire_*. It runs startup_indirect_dispatch_warp with the switch unset. They would first run in the full build on main.

Also checked by reading:

  • Wrappers stay registered after the drain (registry().erase is only on the publish-failure path, :5784), so a stale token resolves to the dead wrapper and sampled_address_texture returns null for a non-tiled resource.
  • I found no one-line mutation of the changed lines that the tests would miss:
    • :6291 with the switch term removed fails the on cases (the mutant in the description); inverted, it also fails the control (T1 freed while its slot was live);
    • :536 without the switch term fails the startup_indirect_*_inline byte check;
    • startup_indirect_dispatch.cpp:386 with == fails every startup_indirect_dispatch case.
<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6101140101 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3429#pullrequestreview-6101140101). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-11-29T02:51:13Z. **Review:** CHANGES_REQUESTED --- Changes requested at 9d49b8c2. Read the diff and the surrounding code on main 212d4b5f; nothing built or run, so the race below is found by reading, not reproduced. **Release vs. draw race.** With the switch, the drain frees a retired texture while descriptors still name it, and a draw that reaches such a descriptor is the expected case (it should bind null). That draw can instead record the texture while the drain frees it: - `drain_retired_resources` claims the wrapper and sets `own().real = nullptr` under `retire_lock` only (d3d12_xs_device.cpp:6300-6302). It takes `draw_lock` later, only around `texture_uploads().erase` (:6337-6339), and calls `Release()` after dropping it (:6340). - `draw_translated` holds `draw_lock` from d3d12_draw.inl:2883 to the end of the call. It reads `texture = sampled_address_texture(resource)` at :3114 (a plain read of `own().real`, d3d12_memory_srv.inl:583, no `retire_lock`), then runs `upload_texture` (:3151), `require_state` (:3153) and only then `retire_hold` (:3154). - If the drain clears `real` between :3114 and :3154, `retire_hold` reads null under `retire_lock` (:6131), holds nothing and sets `retire_hold_missed` (:6152) on a wrapper that already left `retired_resources`. The draw keeps its local `texture`: the transition is already recorded and `CreateShaderResourceView(texture, ...)` follows at :3195. - `draw_lock` does not close the window. It only delays the drain's `Release()` until the draw call returns; the list is still open and unsubmitted, and nothing holds the desktop object unless an earlier draw of the same list did. - The drain runs at the top of `queue_execute` (:4776) and `queue_present` (:7568), before either takes `draw_lock`, so it needs one thread recording while another submits or presents. On main the drain skips a texture while any tracked slot names it (`retire_view_refs > 0`), so a draw can only get there through an uncounted descriptor. With the switch no copy is counted and the check is skipped (:6291). Possible fix: take the hold before the first use (right after :3114, ahead of `upload_texture` and `require_state`), have `retire_hold` report that it found `real` cleared, and bind null in that case. native_mesh57.inl:122/188-189 has the same read, use, hold order. The compute path reads `real` at d3d12_compute_dispatch.inl:690 and takes no hold at all. `startup_inline_retire` does not reach any of this: it resolves tokens through `x2w_d3d12_token_texture` on one thread. Smaller points: - `X2W_D3D12_RETIRE_REASONS` (:6479) still reports a queued resource with `retire_view_refs > 0` as `view_refs`. With the switch the drain no longer waits on view refs. - #3377 (open) replaces the `words[1] < view_records().size()` decodes with `token_view()`. `x2w_d3d12_token_texture` (:6610-6613) adds one more of the old decodes, so whichever PR merges second has to convert it. - PR CI runs none of the new tests. `startup_inline_retire` is not a target of the `pr` build preset, and the `pr` test filter `startup_indirect_(dispatch|...)_warp` matches neither `startup_indirect_*_inline_warp` nor `startup_inline_retire_*`. It runs `startup_indirect_dispatch_warp` with the switch unset. They would first run in the full build on main. Also checked by reading: - Wrappers stay registered after the drain (`registry().erase` is only on the publish-failure path, :5784), so a stale token resolves to the dead wrapper and `sampled_address_texture` returns null for a non-tiled resource. - I found no one-line mutation of the changed lines that the tests would miss: - :6291 with the switch term removed fails the `on` cases (the mutant in the description); inverted, it also fails the control (`T1 freed while its slot was live`); - :536 without the switch term fails the `startup_indirect_*_inline` byte check; - startup_indirect_dispatch.cpp:386 with `==` fails every `startup_indirect_dispatch` case.
lukaslw-lab commented 2026-11-29 04:47:36 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by lukaslw-lab on 2026-11-29T04:47:36Z.


Thanks — confirmed by reading. Fixed in 2130dcec: draw, mesh and compute take the hold right after reading the
texture, before any use; retire_hold returns false if the drain already cleared real, and the read then binds
null (draw) or refuses (mesh, compute). Compute had no hold at all before.

  • Late reads are logged and no longer set retire_hold_missed; a repeated hold by the same recording skips the lock.
  • RETIRE_REASONS no longer reports view_refs with the switch; PR CI now builds and runs the new tests.
  • x2w_d3d12_token_texture: I'll convert it in whichever of #3377 / #3429 merges second.

New fixture startup_resource_retire_title … inline (case 11): a draw through a stale descriptor holds a released
texture (also from a second list and after a reset) and binds null once it is freed. Removing the hold fails it; the
read-to-hold order itself needs a second thread and is not covered.

Check Result
PR set + copies 151 run, 134 pass, 17 skip (WARP mesh), 0 fail
Stack A/B, same save fps 23.23 → 23.00 (3 baseline runs vs 1), memory and draws unchanged, 0 late reads
<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7250864789 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3429#issuecomment-7250864789). Originally posted by [lukaslw-lab](https://github.com/lukaslw-lab) on 2026-11-29T04:47:36Z. --- Thanks — confirmed by reading. Fixed in `2130dcec`: draw, mesh and compute take the hold right after reading the texture, before any use; `retire_hold` returns `false` if the drain already cleared `real`, and the read then binds null (draw) or refuses (mesh, compute). Compute had no hold at all before. - Late reads are logged and no longer set `retire_hold_missed`; a repeated hold by the same recording skips the lock. - `RETIRE_REASONS` no longer reports `view_refs` with the switch; PR CI now builds and runs the new tests. - `x2w_d3d12_token_texture`: I'll convert it in whichever of #3377 / #3429 merges second. New fixture `startup_resource_retire_title … inline` (case 11): a draw through a stale descriptor holds a released texture (also from a second list and after a reset) and binds null once it is freed. Removing the hold fails it; the read-to-hold order itself needs a second thread and is not covered. | Check | Result | |---|---| | PR set + copies | 151 run, 134 pass, 17 skip (WARP mesh), 0 fail | | Stack A/B, same save | fps 23.23 → 23.00 (3 baseline runs vs 1), memory and draws unchanged, 0 late reads |
Leyukaka commented 2026-11-29 04:56:31 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-29T04:56:31Z.

Review: APPROVED


Approving at 2130dcec. Read the diff 9d49b8c2..2130dcec and the surrounding code at that head; nothing built or run.

Race. Closed, as far as reading shows:

  • Draw: the hold now sits right after the read and ahead of every use. d3d12_draw.inl:3114 read, :3116 retire_hold, then GetDesc (:3124), upload_texture (:3153), require_state (:3154) and CreateShaderResourceView (:3194).
  • retire_hold reads own().real under retire_lock, the lock the drain clears it under (d3d12_xs_device.cpp:6326). If real is null it returns false (:6144-6149) without setting retire_hold_missed. The draw then binds null (:3194 with texture == nullptr), and an indirect draw refuses (:3174-3178). If the hold wins, the AddRef happens before the drain's clear, and the drain's own Release() (:6364) leaves the list's reference.
  • real of a resource wrapper is set once at creation (:534) and afterwards only cleared, and a wrapper handed to the caller is never freed (the only free, :5792, is on the publish-failure path). So a non-null real under the lock is the object the caller read.
  • Mesh: hold at native_mesh57.inl:124, right after the read at :122. On false the call refuses (:125-126). The old hold after require_state (:189) is removed.
  • Compute: hold at d3d12_compute_dispatch.inl:693, right after the read at :689-690 and before GetDesc (:694).
  • The fast path (:6136-6138) skips the lock only when the resource carries the stamp of this list's current hold set. That set is dropped only by retire_discard_holds (:6182 clears the stamp), reached from Reset or destruction of that list (:3308), which D3D12 does not allow while another thread records on it. So the object the caller read is still referenced.
  • The one remaining unheld read, d16_srvs_ready (d3d12_draw.inl:2251), uses the pointer for GetDesc and a stand-in lookup and has no list to record on. It runs under draw_lock (called at :2896, lock at :2883), and the drain takes draw_lock (:6361) after clearing real and before its Release() (:6364).

Remaining limit: fixture case 11. It runs on one thread, as its comment says, so it never reaches the read-to-hold window or the !real branch: in 11b the draw reads real as already null and does not call retire_hold. It would also pass with the old read, use, hold order, so it does not tell the fix apart. What it covers: a draw takes a hold, the stamp is per recording (second list, and the same list after a reset), and a freed texture binds null. Mesh and compute holds are not exercised.

Smaller points.

  • X2W_D3D12_RETIRE_REASONS: view_refs is now reported only without the switch (:6503), which matches the drain (:6315).
  • x2w_d3d12_token_texture still uses the words[1] < view_records().size() decode (:6638). #3377 is still open, and the author has said they will convert it in whichever of the two PRs merges second.
  • The PR now also adds its tests to the pr preset: CMakePresets.json gains two build targets and three alternatives in the test filter (startup_indirect_(dispatch|constants|count)_inline_warp, startup_inline_retire_(on|control)_warp, and the warp debug0 run of the new retire test); it removes nothing. The 11 lines added to tests/cmake/startup_inline_retire.cmake are foreach/set/add_test/set_tests_properties only.
  • CI on 2130dcec: "Build and test on Windows" passed; the gfx1013 and Python jobs pass, /O2 and coverage are skipped.
<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6101492074 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3429#pullrequestreview-6101492074). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-11-29T04:56:31Z. **Review:** APPROVED --- Approving at 2130dcec. Read the diff 9d49b8c2..2130dcec and the surrounding code at that head; nothing built or run. **Race.** Closed, as far as reading shows: - Draw: the hold now sits right after the read and ahead of every use. d3d12_draw.inl:3114 read, :3116 `retire_hold`, then `GetDesc` (:3124), `upload_texture` (:3153), `require_state` (:3154) and `CreateShaderResourceView` (:3194). - `retire_hold` reads `own().real` under `retire_lock`, the lock the drain clears it under (d3d12_xs_device.cpp:6326). If `real` is null it returns false (:6144-6149) without setting `retire_hold_missed`. The draw then binds null (:3194 with `texture == nullptr`), and an indirect draw refuses (:3174-3178). If the hold wins, the AddRef happens before the drain's clear, and the drain's own `Release()` (:6364) leaves the list's reference. - `real` of a resource wrapper is set once at creation (:534) and afterwards only cleared, and a wrapper handed to the caller is never freed (the only free, :5792, is on the publish-failure path). So a non-null `real` under the lock is the object the caller read. - Mesh: hold at native_mesh57.inl:124, right after the read at :122. On false the call refuses (:125-126). The old hold after `require_state` (:189) is removed. - Compute: hold at d3d12_compute_dispatch.inl:693, right after the read at :689-690 and before `GetDesc` (:694). - The fast path (:6136-6138) skips the lock only when the resource carries the stamp of this list's current hold set. That set is dropped only by `retire_discard_holds` (:6182 clears the stamp), reached from Reset or destruction of that list (:3308), which D3D12 does not allow while another thread records on it. So the object the caller read is still referenced. - The one remaining unheld read, `d16_srvs_ready` (d3d12_draw.inl:2251), uses the pointer for `GetDesc` and a stand-in lookup and has no list to record on. It runs under `draw_lock` (called at :2896, lock at :2883), and the drain takes `draw_lock` (:6361) after clearing `real` and before its `Release()` (:6364). **Remaining limit: fixture case 11.** It runs on one thread, as its comment says, so it never reaches the read-to-hold window or the `!real` branch: in 11b the draw reads `real` as already null and does not call `retire_hold`. It would also pass with the old read, use, hold order, so it does not tell the fix apart. What it covers: a draw takes a hold, the stamp is per recording (second list, and the same list after a reset), and a freed texture binds null. Mesh and compute holds are not exercised. **Smaller points.** - `X2W_D3D12_RETIRE_REASONS`: `view_refs` is now reported only without the switch (:6503), which matches the drain (:6315). - `x2w_d3d12_token_texture` still uses the `words[1] < view_records().size()` decode (:6638). #3377 is still open, and the author has said they will convert it in whichever of the two PRs merges second. - The PR now also adds its tests to the `pr` preset: `CMakePresets.json` gains two build targets and three alternatives in the test filter (`startup_indirect_(dispatch|constants|count)_inline_warp`, `startup_inline_retire_(on|control)_warp`, and the warp debug0 run of the new retire test); it removes nothing. The 11 lines added to `tests/cmake/startup_inline_retire.cmake` are `foreach`/`set`/`add_test`/`set_tests_properties` only. - CI on 2130dcec: "Build and test on Windows" passed; the gfx1013 and Python jobs pass, /O2 and coverage are skipped.
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!3429
No description provided.