runtime: recover the published disk pair after a failed native candidate PSO #3874

Merged
Leyukaka merged 8 commits from upstream-pr/3874 into main 2026-12-03 05:32:18 +00:00
Leyukaka commented 2026-12-02 16:54:22 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-12-02T16:54:22Z.


Change

Carries #3139 by @lambirou to main with his commits. #3139 was merged into the former integration branch and never reached main; his six commits are kept with their author and messages, rebased onto current main, followed by one commit of ours (05eff6113).

Fixes #3134. Refs #2978 (the remaining main acceptance described in the 12-02 comment).

On main, a null result from native candidate graphics PSO creation went to pipeline_state_unavailable and the draw exited without reloading the published pair. With this change:

  • When the native candidate's PSO fails, pipeline_for falls back to the published disk pair, and bindings are prepared from the translation that pipeline_for leaves in place (@lambirou's commits).
  • If no pair is published yet, the failed candidate stays refused and the runtime looks the published pair up again on the manifest re-read delay, without recreating the candidate PSO. Carried over as is, the fallback cached the null pipeline on main, so a pair published later in the same process never drew. A refused manifest ends the retries (05eff6113).
  • Native-only mode and a missing or invalid pair still refuse with a diagnostic, and the target stays clear.

Fixture (startup_native_graphics_draw, source-built, same process):

  • The failure is injected only for the native candidate (X2W_TEST_NATIVE_GRAPHICS_PSO_FAILURE, gated on the candidate); the disk pair's PSO is created normally.
  • The first draw leaves the target clear (32 clear pixels). After the pair is published, the retry reads back 16 red and 16 clear pixels after the fence.
  • <key>.txt, <key>.vs.cso and <key>.ps.cso keep their bytes and modification times.
  • Controls: native-only refusal, missing pair, invalid manifest, invalid pixel blob, RTV variant fallback and RTV variant without a manifest.

The test hook from #3139 that moved a file from a path given in an environment variable is removed from the runtime; the RTV variant and invalid pixel blob controls now use the consumer's same-process publication instead.

Shared interface touched: pipeline_for and draw_translated in src/startup_stubs/d3d12_draw.inl. Open PRs that edit pipeline_for will conflict with this one.

Verification

Windows, MSVC, exact head 05eff6113, GPU tests run serially.

cmake --build --preset dev --target compile_dxil startup_stream_consumer d3d12_xs_shim
ctest --preset dev --no-tests=error --output-on-failure -j 1 -R "^(startup_native_graphics_draw|startup_mrt_dxc|native_rtv_variant)_(warp|hardware)$|^native_rtv_variant_controls$"
ctest --preset dev --no-tests=error --output-on-failure -j 1 -R "^(startup_indirect_.*|startup_stream_draw.*|startup_indirect_requests)$"
  • startup_native_graphics_draw, startup_mrt_dxc, native_rtv_variant: pass on WARP and on hardware (reported separately by the _warp and _hardware tests).
  • native_rtv_variant_controls, startup_stream_draw, startup_indirect_requests: pass.
  • 40 startup_indirect_* draw, translated, bucket and mesh-cache tests: pass on WARP and on hardware.

Evidence and follow-up

No new fixture files; the existing source-built triangle fixture is extended. All inputs are synthetic and generated by the test.

Known points for review:

  • The PSO is now created before the d16, formatted-buffer, fixed-vertex and indirect checks (057bd7403). An indirect draw that is refused later may create a PSO first, and the order of refusal reasons for indirect draws can change. The indirect suite passes.
  • When a candidate is replaced by the disk pair, the candidate's root signature is intentionally not released, because an already recorded draw may still reference it. This is a small leak per recovered key, documented in the code.
  • Some of @lambirou's commit messages refer to the former integration base; they are kept verbatim.

Checklist

  • This pull request covers one reviewable behavior.
  • I included the exact command and result for every check I ran.
  • I considered a negative control or failure case for a new fixture.
  • I updated README/docs when a capability or build requirement changed. (none changed)
  • I did not include proprietary files, dumps, distribution links or secrets.
<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:5611029649 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3874). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-12-02T16:54:22Z. --- ## Change Carries #3139 by @lambirou to `main` with his commits. #3139 was merged into the former integration branch and never reached `main`; his six commits are kept with their author and messages, rebased onto current `main`, followed by one commit of ours (`05eff6113`). Fixes #3134. Refs #2978 (the remaining main acceptance described in the [12-02 comment](https://github.com/R0Y00/Xbox2Windows/issues/2978)). On `main`, a null result from native candidate graphics PSO creation went to `pipeline_state_unavailable` and the draw exited without reloading the published pair. With this change: - When the native candidate's PSO fails, `pipeline_for` falls back to the published disk pair, and bindings are prepared from the translation that `pipeline_for` leaves in place (@lambirou's commits). - If no pair is published yet, the failed candidate stays refused and the runtime looks the published pair up again on the manifest re-read delay, without recreating the candidate PSO. Carried over as is, the fallback cached the null pipeline on `main`, so a pair published later in the same process never drew. A refused manifest ends the retries (`05eff6113`). - Native-only mode and a missing or invalid pair still refuse with a diagnostic, and the target stays clear. Fixture (`startup_native_graphics_draw`, source-built, same process): - The failure is injected only for the native candidate (`X2W_TEST_NATIVE_GRAPHICS_PSO_FAILURE`, gated on the candidate); the disk pair's PSO is created normally. - The first draw leaves the target clear (32 clear pixels). After the pair is published, the retry reads back 16 red and 16 clear pixels after the fence. - `<key>.txt`, `<key>.vs.cso` and `<key>.ps.cso` keep their bytes and modification times. - Controls: native-only refusal, missing pair, invalid manifest, invalid pixel blob, RTV variant fallback and RTV variant without a manifest. The test hook from #3139 that moved a file from a path given in an environment variable is removed from the runtime; the RTV variant and invalid pixel blob controls now use the consumer's same-process publication instead. Shared interface touched: `pipeline_for` and `draw_translated` in `src/startup_stubs/d3d12_draw.inl`. Open PRs that edit `pipeline_for` will conflict with this one. ## Verification Windows, MSVC, exact head `05eff6113`, GPU tests run serially. ``` cmake --build --preset dev --target compile_dxil startup_stream_consumer d3d12_xs_shim ctest --preset dev --no-tests=error --output-on-failure -j 1 -R "^(startup_native_graphics_draw|startup_mrt_dxc|native_rtv_variant)_(warp|hardware)$|^native_rtv_variant_controls$" ctest --preset dev --no-tests=error --output-on-failure -j 1 -R "^(startup_indirect_.*|startup_stream_draw.*|startup_indirect_requests)$" ``` - `startup_native_graphics_draw`, `startup_mrt_dxc`, `native_rtv_variant`: pass on WARP and on hardware (reported separately by the `_warp` and `_hardware` tests). - `native_rtv_variant_controls`, `startup_stream_draw`, `startup_indirect_requests`: pass. - 40 `startup_indirect_*` draw, translated, bucket and mesh-cache tests: pass on WARP and on hardware. ## Evidence and follow-up No new fixture files; the existing source-built triangle fixture is extended. All inputs are synthetic and generated by the test. Known points for review: - The PSO is now created before the d16, formatted-buffer, fixed-vertex and indirect checks (`057bd7403`). An indirect draw that is refused later may create a PSO first, and the order of refusal reasons for indirect draws can change. The indirect suite passes. - When a candidate is replaced by the disk pair, the candidate's root signature is intentionally not released, because an already recorded draw may still reference it. This is a small leak per recovered key, documented in the code. - Some of @lambirou's commit messages refer to the former integration base; they are kept verbatim. ## Checklist - [x] This pull request covers one reviewable behavior. - [x] I included the exact command and result for every check I ran. - [x] I considered a negative control or failure case for a new fixture. - [x] I updated README/docs when a capability or build requirement changed. (none changed) - [x] I did not include proprietary files, dumps, distribution links or secrets.
mumba17 commented 2026-12-02 20:03:36 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by mumba17 on 2026-12-02T20:03:36Z.

Review: COMMENTED


Reviewed 05eff611 by reading the diff against main 1cd972cd, side by side with #3873 (same #3139 carry, same issue). Not built or run. Comment only: I'm not a maintainer.

Summary. Of the two, this one looks like the better base: it keeps @lambirou's commits, removes the runtime file-move hook, and handles a pair published after the candidate fails. No blocker found. Points below, most important first.

  • SHOULD (shared with #3873, from #3139): the per-draw env read. X2W_TEST_BUMP_TRANSLATION_REVISION is read with x2w_local::env_on on every translated draw, under draw_lock. env_on is uncached (local_log.h:17: GetEnvironmentVariableA plus Get/SetLastError each call), and draws are the hot path. A function-local static const bool, like sync_mesh_requests() in the same file, keeps it a one-time read. X2W_TEST_NATIVE_GRAPHICS_PSO_FAILURE is read only when a candidate's PSO is created, so it's fine as is.
  • QUESTION (shared with #3873): releasing the command signature when the candidate is replaced. The new comment keeps the candidate's root (raw pointer) alive because a recorded list may still use it. But tr = std::move(fallback) also move-assigns indexed_signature, which is a ComPtr<ID3D12CommandSignature> created against the candidate's root (d3d12_draw.inl:2760) and passed to ExecuteIndirect (:4395). In the partial case, the candidate's PSO succeeded for one state key and an indexed indirect draw was recorded, then failed for another. Recovery would then release a signature that an unexecuted list may still reference. The injected failure fails every candidate PSO, so the fixture can't reach this. If the partial case is possible, keeping indexed_signature alongside root (or deferring its release) closes it. If it isn't, a comment saying so would help.
  • NIT: first recovery attempt. recover_published_pair loads through the absent cache. A pair published just before the candidate fails can therefore read as absent until the change feed drains, and the draw then recovers on the first retry (1 s later) instead of immediately. #3873 bypasses the absent cache for this one load (use_absent_cache=false, plus note_cache_write after its own publish). Optional, since the retry already covers it.
  • NIT: the startup_native_graphics_draw_* timeout goes 120 → 180 s with no note on what takes longer. One line in the PR body would help, e.g. the retry wait in the later-publication control.

Checked, no finding:

  • Later publication: load_translation calls manifest_retry.missed() outside the new count gate (:718), so candidate_retry is scheduled even with count=false. due() is false once a manifest is refused (found() clears at), which matches "a refused manifest ends the retries". Until then, a failed candidate returns null before the bound-pipeline cache lookup, so no null PSO is cached for it.
  • Recursion: the fallback has native_candidate=false and revision = old + 1. The recursive pipeline_for therefore can't re-enter recovery and can't reuse a candidate-era cache entry, and recipe replay/recording is skipped while revision is set.
  • geometry_rect is derived from the translation pipeline_for leaves in tr, and draw_translated now creates the PSO before the d16, formatted-buffer and fixed-vertex bindings, so a fallback that drops the fixed stream gets the right key. As your notes say, this moves PSO creation ahead of those refusals for indirect draws.
  • The !tr path keeps indirect && tr for translation_not_ready, as on main. #3873 widens it to indirect.

Compared with #3873 for whoever picks one:

  • Authorship: this PR keeps @lambirou's six commits. #3873 re-applies the change in one commit.
  • Pair published after the failure: handled here (retry on the manifest delay). In #3873, a failed fallback falls through to bound.pipelines[cache_key] = nullptr, so that bound stays null for the rest of the process even after the translator publishes the pair.
  • Runtime test hook: #3873 keeps X2W_TEST_MANIFEST_BEFORE_FALLBACK, which moves <path>.pending to a path taken from the environment inside pipeline_for. This PR removes it and publishes from the consumer.

AI-assisted (Claude Code).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6158003737 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3874#pullrequestreview-6158003737). Originally posted by [mumba17](https://github.com/mumba17) on 2026-12-02T20:03:36Z. **Review:** COMMENTED --- Reviewed `05eff611` by reading the diff against `main` `1cd972cd`, side by side with #3873 (same #3139 carry, same issue). Not built or run. Comment only: I'm not a maintainer. **Summary.** Of the two, this one looks like the better base: it keeps @lambirou's commits, removes the runtime file-move hook, and handles a pair published after the candidate fails. No blocker found. Points below, most important first. - **SHOULD (shared with #3873, from #3139): the per-draw env read.** `X2W_TEST_BUMP_TRANSLATION_REVISION` is read with `x2w_local::env_on` on every translated draw, under `draw_lock`. `env_on` is uncached (`local_log.h:17`: `GetEnvironmentVariableA` plus `Get/SetLastError` each call), and draws are the hot path. A function-local `static const bool`, like `sync_mesh_requests()` in the same file, keeps it a one-time read. `X2W_TEST_NATIVE_GRAPHICS_PSO_FAILURE` is read only when a candidate's PSO is created, so it's fine as is. - **QUESTION (shared with #3873): releasing the command signature when the candidate is replaced.** The new comment keeps the candidate's `root` (raw pointer) alive because a recorded list may still use it. But `tr = std::move(fallback)` also move-assigns `indexed_signature`, which is a `ComPtr<ID3D12CommandSignature>` created against the candidate's root (`d3d12_draw.inl:2760`) and passed to `ExecuteIndirect` (`:4395`). In the partial case, the candidate's PSO succeeded for one state key and an indexed indirect draw was recorded, then failed for another. Recovery would then release a signature that an unexecuted list may still reference. The injected failure fails every candidate PSO, so the fixture can't reach this. If the partial case is possible, keeping `indexed_signature` alongside `root` (or deferring its release) closes it. If it isn't, a comment saying so would help. - **NIT: first recovery attempt.** `recover_published_pair` loads through the absent cache. A pair published just before the candidate fails can therefore read as absent until the change feed drains, and the draw then recovers on the first retry (1 s later) instead of immediately. #3873 bypasses the absent cache for this one load (`use_absent_cache=false`, plus `note_cache_write` after its own publish). Optional, since the retry already covers it. - **NIT:** the `startup_native_graphics_draw_*` timeout goes 120 → 180 s with no note on what takes longer. One line in the PR body would help, e.g. the retry wait in the later-publication control. Checked, no finding: - Later publication: `load_translation` calls `manifest_retry.missed()` outside the new `count` gate (`:718`), so `candidate_retry` is scheduled even with `count=false`. `due()` is false once a manifest is refused (`found()` clears `at`), which matches "a refused manifest ends the retries". Until then, a failed candidate returns null before the bound-pipeline cache lookup, so no null PSO is cached for it. - Recursion: the fallback has `native_candidate=false` and `revision = old + 1`. The recursive `pipeline_for` therefore can't re-enter recovery and can't reuse a candidate-era cache entry, and recipe replay/recording is skipped while `revision` is set. - `geometry_rect` is derived from the translation `pipeline_for` leaves in `tr`, and `draw_translated` now creates the PSO before the d16, formatted-buffer and fixed-vertex bindings, so a fallback that drops the fixed stream gets the right key. As your notes say, this moves PSO creation ahead of those refusals for indirect draws. - The `!tr` path keeps `indirect && tr` for `translation_not_ready`, as on `main`. #3873 widens it to `indirect`. Compared with #3873 for whoever picks one: - **Authorship:** this PR keeps @lambirou's six commits. #3873 re-applies the change in one commit. - **Pair published after the failure:** handled here (retry on the manifest delay). In #3873, a failed fallback falls through to `bound.pipelines[cache_key] = nullptr`, so that bound stays null for the rest of the process even after the translator publishes the pair. - **Runtime test hook:** #3873 keeps `X2W_TEST_MANIFEST_BEFORE_FALLBACK`, which moves `<path>.pending` to a path taken from the environment inside `pipeline_for`. This PR removes it and publishes from the consumer. AI-assisted (Claude Code).
R0Y00 commented 2026-12-02 22:27:07 +00:00 (Migrated from github.com)

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

Review: COMMENTED


I checked the trial merge of 05eff611 with main 67862ee4. The two conflict hunks are both in d3d12_draw.inl. Please carry forward #3818's depth-view unbind/rebind helpers and #3821's physical descriptor-table refusal. The latter needs to validate the translation that will actually bind resources after PSO recovery, because pipeline_for can replace tr with the disk pair. Keep the direct-draw and exact guest-root requirements for that final translation. A fallback control that verifies the physical-table refusal would make this merge resolution testable. The other files merge cleanly.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6160145910 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3874#pullrequestreview-6160145910). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-12-02T22:27:07Z. **Review:** COMMENTED --- I checked the trial merge of `05eff611` with `main` `67862ee4`. The two conflict hunks are both in `d3d12_draw.inl`. Please carry forward #3818's depth-view unbind/rebind helpers and #3821's physical descriptor-table refusal. The latter needs to validate the translation that will actually bind resources after PSO recovery, because `pipeline_for` can replace `tr` with the disk pair. Keep the direct-draw and exact guest-root requirements for that final translation. A fallback control that verifies the physical-table refusal would make this merge resolution testable. The other files merge cleanly.
R0Y00 commented 2026-12-03 04:49:36 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-03T04:49:36Z.


One additional integration point for the #2978 fallback: the trial merge of 05eff611 onto 9dfe168a now also conflicts with #3527 in CMakeLists.txt and tests/startup_native_graphics_draw_check.py. Please keep the shared triangle/environment helpers and the --fixed-slot57 mode and its startup_native_graphics_fixed_entry_{warp,hardware} registrations. The longer timeout for the fallback fixture can coexist with the existing fixed-entry timeout. After the merge, run both the original fixed-entry and the new later-publication tests on the same build. The earlier depth rebind and final-translation physical-table checks still apply.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7368083795 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3874#issuecomment-7368083795). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-12-03T04:49:36Z. --- One additional integration point for the #2978 fallback: the trial merge of `05eff611` onto `9dfe168a` now also conflicts with #3527 in `CMakeLists.txt` and `tests/startup_native_graphics_draw_check.py`. Please keep the shared triangle/environment helpers and the `--fixed-slot57` mode and its `startup_native_graphics_fixed_entry_{warp,hardware}` registrations. The longer timeout for the fallback fixture can coexist with the existing fixed-entry timeout. After the merge, run both the original fixed-entry and the new later-publication tests on the same build. The earlier depth rebind and final-translation physical-table checks still apply.
R0Y00 commented 2026-12-03 05:14:41 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-03T05:14:41Z.

Review: COMMENTED


I tried 05eff611 on main 9dfe168a (local tree 48afc66070f90f7ffa1a12464b3406c95e23834d). The resolution keeps the depth-view unbind/rebind helpers and both fixed-entry test registrations. It keeps the 180-second fallback timeout and the 120-second fixed-entry timeout. The physical-table root check runs on the translation returned by pipeline_for, before bindings are prepared.

MSVC Debug, Windows build 26300, WARP 10.0.26100.9818 and RTX 4060 Laptop 32.0.16.1656, debug layer enabled: ctest --preset dev --no-tests=error -j 1 -V -R '^startup_native_graphics_(draw|fixed_entry)_(warp|hardware)$' passed 4/4, and '^startup_slot67_indirect_dispatch_(warp|hardware)$' passed 2/2. No capability skips. On both adapters the source-built ordinary cold/hot draw read back 16 red and 16 clear pixels. With native PSO creation faulted, the first draw stayed clear and the same-process retry after publication produced the expected pixels. The existing cache-byte and timestamp checks and missing/invalid pair and native-only controls passed.

Separately, I marked only the recovered pair as physical_tables immediately after its successful PSO in a temporary diagnostic. In the same fixture, behind a mismatched guest root, both adapters logged the final-translation root refusal and left all 32 pixels clear on both attempts. This isolates the guard ordering. A full physical-table manifest fixture, the just-published-before-fallback case from #3873, and the command signature lifetime review remain open. The diagnostic was restored and no branch was pushed.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6164070036 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3874#pullrequestreview-6164070036). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-12-03T05:14:41Z. **Review:** COMMENTED --- I tried `05eff611` on `main` `9dfe168a` (local tree `48afc66070f90f7ffa1a12464b3406c95e23834d`). The resolution keeps the depth-view unbind/rebind helpers and both fixed-entry test registrations. It keeps the 180-second fallback timeout and the 120-second fixed-entry timeout. The physical-table root check runs on the translation returned by `pipeline_for`, before bindings are prepared. MSVC Debug, Windows build 26300, WARP 10.0.26100.9818 and RTX 4060 Laptop 32.0.16.1656, debug layer enabled: `ctest --preset dev --no-tests=error -j 1 -V -R '^startup_native_graphics_(draw|fixed_entry)_(warp|hardware)$'` passed 4/4, and `'^startup_slot67_indirect_dispatch_(warp|hardware)$'` passed 2/2. No capability skips. On both adapters the source-built ordinary cold/hot draw read back 16 red and 16 clear pixels. With native PSO creation faulted, the first draw stayed clear and the same-process retry after publication produced the expected pixels. The existing cache-byte and timestamp checks and missing/invalid pair and native-only controls passed. Separately, I marked only the recovered pair as `physical_tables` immediately after its successful PSO in a temporary diagnostic. In the same fixture, behind a mismatched guest root, both adapters logged the final-translation root refusal and left all 32 pixels clear on both attempts. This isolates the guard ordering. A full physical-table manifest fixture, the just-published-before-fallback case from #3873, and the command signature lifetime review remain open. The diagnostic was restored and no branch was pushed.
Leyukaka commented 2026-12-03 05:20:31 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-12-03T05:20:31Z.


Thanks. Rebased onto 9dfe168a0 (new head f5c75f6d8). Both conflicts with #3527 are resolved as a union:

  • tests/startup_native_graphics_draw_check.py: triangle_program(), graphics_env(), CLEAR and the --fixed-slot57 mode are kept as they are on main. The fallback fixture now builds its environment from the shared helper, dict(graphics_env(sdk, cache), X2W_NATIVE_SHADERS_ONLY="0") (:102).
  • CMakeLists.txt: the startup_native_graphics_fixed_entry_{warp,hardware} registrations are kept with --fixed-slot57 and TIMEOUT 120 (:2183-2186). startup_native_graphics_draw_{warp,hardware} uses TIMEOUT 180 for the later-publication cases (:2182). That one value is the PR's only change to this file.

The earlier checks are still in place after the rebase (src/startup_stubs/d3d12_draw.inl):

  • Depth rebind: depth_target_rebind (:1796) still runs after a depth-unbound draw (:4537).
  • Final-translation physical tables: physical_tables_refused (:3762) runs before the PSO (:3827) and again on the translation that pipeline_for leaves in place when a recovered pair raises the revision (:3838).

The points from @mumba17's review are in f5c75f6d8: the candidate's command signature is retained on recovery (:1824-1828), X2W_TEST_BUMP_TRANSLATION_REVISION is read once (:3775), and the recovery load bypasses the absent cache (:709, :1814).

Validation on Windows (MSVC), WARP and a hardware adapter, one build of f5c75f6d8 for all tests:

Test WARP Hardware
startup_native_graphics_fixed_entry_* (original fixed-entry) pass pass
startup_native_graphics_draw_* (later-publication controls) pass pass

16 of the 21 tests in the set passed. The 5 failures are not from this PR:

  • startup_indirect_translated_draw_{warp,hardware}
  • startup_indirect_translated_refusal_census_{warp,hardware,control_warp}

These five fail the same way on unmodified main since #3776. The fix is in #3890, which is under review. I can rerun the full set on top of #3890 once it lands.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7368634680 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3874#issuecomment-7368634680). Originally posted by [Leyukaka](https://github.com/Leyukaka) on 2026-12-03T05:20:31Z. --- Thanks. Rebased onto `9dfe168a0` (new head `f5c75f6d8`). Both conflicts with #3527 are resolved as a union: - `tests/startup_native_graphics_draw_check.py`: `triangle_program()`, `graphics_env()`, `CLEAR` and the `--fixed-slot57` mode are kept as they are on main. The fallback fixture now builds its environment from the shared helper, `dict(graphics_env(sdk, cache), X2W_NATIVE_SHADERS_ONLY="0")` (`:102`). - `CMakeLists.txt`: the `startup_native_graphics_fixed_entry_{warp,hardware}` registrations are kept with `--fixed-slot57` and `TIMEOUT 120` (`:2183-2186`). `startup_native_graphics_draw_{warp,hardware}` uses `TIMEOUT 180` for the later-publication cases (`:2182`). That one value is the PR's only change to this file. The earlier checks are still in place after the rebase (`src/startup_stubs/d3d12_draw.inl`): - Depth rebind: `depth_target_rebind` (`:1796`) still runs after a depth-unbound draw (`:4537`). - Final-translation physical tables: `physical_tables_refused` (`:3762`) runs before the PSO (`:3827`) and again on the translation that `pipeline_for` leaves in place when a recovered pair raises the revision (`:3838`). The points from @mumba17's review are in `f5c75f6d8`: the candidate's command signature is retained on recovery (`:1824-1828`), `X2W_TEST_BUMP_TRANSLATION_REVISION` is read once (`:3775`), and the recovery load bypasses the absent cache (`:709`, `:1814`). Validation on Windows (MSVC), WARP and a hardware adapter, one build of `f5c75f6d8` for all tests: | Test | WARP | Hardware | | --- | --- | --- | | `startup_native_graphics_fixed_entry_*` (original fixed-entry) | pass | pass | | `startup_native_graphics_draw_*` (later-publication controls) | pass | pass | 16 of the 21 tests in the set passed. The 5 failures are not from this PR: - `startup_indirect_translated_draw_{warp,hardware}` - `startup_indirect_translated_refusal_census_{warp,hardware,control_warp}` These five fail the same way on unmodified main since #3776. The fix is in #3890, which is under review. I can rerun the full set on top of #3890 once it lands.
R0Y00 commented 2026-12-03 05:32:13 +00:00 (Migrated from github.com)

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

Review: APPROVED


Independently re-reviewed f5c75f6d in a clean trial merge onto 2a280a94 (tree ca6c7bcf6263d44cd48eb85b43201cac1a26d355). The code preserves the fixed-entry fixtures and depth rebind, retains the earlier indexed command signature alongside its root, bypasses the absent-cache lookup during recovery, and checks the physical-table root both before PSO creation and on the replacement translation. MSVC Debug ctest --preset dev --no-tests=error -j 1 -V -R '^startup_(native_graphics_(draw|fixed_entry)|slot67_indirect_dispatch)_(warp|hardware)$' passed 6/6. The same five indirect translated draw/refusal-census tests failed on unmodified main and this trial, with the same missing sampled view and refusal-count diagnostics. No capability skips. Windows 11 build 26300, WARP 10.0.26100.9818, RTX 4060 Laptop 32.0.16.1656, debug layer enabled.

For the other publication timing, a local deterministic diagnostic published the source-built pair immediately before the first recovery lookup and simulated a stale negative cache. Both adapters read the pair on that lookup, fenced 16 red and 16 clear pixels, and preserved the cache bytes and mtimes. Re-enabling only the old cache lookup produced 32 clear pixels on both adapters. I restored all diagnostic edits.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6164207705 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/3874#pullrequestreview-6164207705). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-12-03T05:32:13Z. **Review:** APPROVED --- Independently re-reviewed `f5c75f6d` in a clean trial merge onto `2a280a94` (tree `ca6c7bcf6263d44cd48eb85b43201cac1a26d355`). The code preserves the fixed-entry fixtures and depth rebind, retains the earlier indexed command signature alongside its root, bypasses the absent-cache lookup during recovery, and checks the physical-table root both before PSO creation and on the replacement translation. MSVC Debug `ctest --preset dev --no-tests=error -j 1 -V -R '^startup_(native_graphics_(draw|fixed_entry)|slot67_indirect_dispatch)_(warp|hardware)$'` passed 6/6. The same five indirect translated draw/refusal-census tests failed on unmodified main and this trial, with the same missing sampled view and refusal-count diagnostics. No capability skips. Windows 11 build 26300, WARP 10.0.26100.9818, RTX 4060 Laptop 32.0.16.1656, debug layer enabled. For the other publication timing, a local deterministic diagnostic published the source-built pair immediately before the first recovery lookup and simulated a stale negative cache. Both adapters read the pair on that lookup, fenced 16 red and 16 clear pixels, and preserved the cache bytes and mtimes. Re-enabling only the old cache lookup produced 32 clear pixels on both adapters. I restored all diagnostic edits.
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!3874
No description provided.