runtime: recover the published disk pair when native candidate PSO creation fails #3139
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3139"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from R0Y00/Xbox2Windows. Originally posted by lambirou on 2026-11-27T17:02:37Z.
Change A native graphics candidate marked the translation ready before
pipeline_forcreated its desktop PSO. WhenCreateGraphicsPipelineStatefailed, the draw returned null and cached that null, so the target stayed clear even when a valid published disk pair existed. With candidate PSO creation forced toE_FAIL, the target read 0 red / 32 clear; the disk pair alone drew 16 red / 16 clear. The candidate now recordsnative_candidate,revisionandrtv_request. On a candidate PSO failure the runtime reloads the published pair for the same key and RTV variant, recomputes the PSO with a bumped revision (so earlier native PSOs are not reused), and refuses with a diagnostic when the pair is missing or invalid or its disk PSO fails.X2W_NATIVE_SHADERS_ONLY=1keeps its explicit refusal without a fallback. The published manifest and stage files are read, never rewritten. Refs #3134. Refs #3094. Targetscodex/native-graphics-integrationwhile #3094 is open. ## Verification Windows 11 build 10.0.26300.10075 (26H2), MSVC 19.44.35228.0, Windows SDK/DXC 10.0.26100.0. The D3D12 debug layer was unavailable on these runs (0x887a002d), so debug-layer cleanliness is not claimed. Commit06c7380binnative/graphics-pso-fallback.cmake --preset dev cmake --build --preset dev --target compile_dxil startup_stream_consumer d3d12_xs_shim ctest --preset dev --no-tests=error -j 1 -V -R '^startup_native_graphics_draw_(warp|hardware)$' cmake --preset release cmake --build --preset release --target compile_dxil startup_stream_consumer d3d12_xs_shim ctest --preset release --no-tests=error -j 1 -R '^startup_native_graphics_draw_(warp|hardware)$'Debug and Release: 2/2 passed on WARP (Microsoft Basic Render Driver 10.0.26100.10068) and on the AMD Radeon RX 9060 XT (driver 32.0.32029.2010). Observed lines: -warp/hardware PSO: candidate failure recovered the published disk pair, 16 red and 16 clear pixels-warp/hardware native: successful candidate still drew 16 red and 16 clear pixels-warp/hardware missing pair: refused with a diagnostic, 32 clear pixels-warp/hardware invalid pair: refused with a diagnostic, 32 clear pixelsThe check also asserts that the manifest,.vs.csoand.ps.csobytes and mtimes are unchanged after every case. Debug regression:startup_stream_draw_(warp|hardware),startup_compute_dispatch_native_(warp|hardware),native_rtv_variant_(controls|warp|hardware)andstartup_manifest_retry: 8 run, 7 pass, 1 capability skip (startup_compute_dispatch_native_warp, WARP without 32-lane waves), unrelated to this fixture. ## Evidence and follow-up Synthetic inputs only; no game files or captures. The failure is injected only at candidateCreateGraphicsPipelineStatethroughX2W_TEST_NATIVE_GRAPHICS_PSO_FAILURE, so the published-pair path is the only variable. ## Review update (2026-11-27,9360bcae) JVProg's ordering question was correct: there was no guarantee that the native and published translations have matching bindings.pipeline_formay replace*trwith the disk translation after the old code had already preparedd16_unorm16,formatted_buffersand the fixed vertex view. The PSO is now created first, then every binding is derived from the translationpipeline_forleaves intr; if the fallback changesfixed_stream, the indexed-rectangle geometry key is recomputed before the draw. Added the two missing cases tostartup_native_graphics_draw_check.py: - RTV variant (R32G32B32A32_FLOAT): a native draw publishesreq_<key>.rtv,compile_dxil --watch --oncepublishes the variant, and the injected candidate PSO failure recovers it. The readback is0000803f00000000000000000000803f; removing the variant manifest refuses with 32 clear pixels. - Invalid.ps.csowith a valid manifest: the translation loads, disk PSO creation fails, the draw is refused with 32 clear pixels, and the invalid bytes and mtime are unchanged. Verification: dev and release, WARP (Microsoft Basic Render Driver10.0.26100.10068) and RX 9060 XT (driver32.0.32029.2010):startup_native_graphics_draw_warpand_hardware2/2 each; the debug regression set runs 8, passes 7, with one capability skip; release native draw 2/2. The D3D12 debug layer was unavailable (0x887a002d). ## Review update (2026-11-28,4df09294) R0Y00's geometry-flag question is addressed:pipeline_fornow receives the rectangle kind and derivesgeometry_rectfrom the translation it actually holds. After a disk fallback, the recursive call uses the disk pair'sfixed_streamstate instead of the native candidate's. The replaced candidate blobs are released before the swap. A valid same-key disk pair cannot dropfixed_streamwhile its shaders declare an input layout; a hand-edited version 2 manifest reachesCreateGraphicsPipelineStatewith E_INVALIDARG, and the draw now refuses withpublished disk pair pipeline failed. Verification at4df09294, Debug and Release, WARP and RX 9060 XT:powershell ctest --preset dev --no-tests=error -j 1 -R '^(startup_native_graphics_draw_.*|startup_indirect_.*|startup_stream_draw_.*|startup_compute_dispatch_native_.*|native_rtv_variant_.*|startup_manifest_retry.*|startup_.*sampler.*)$' -E 'startup_audio_' ctest --preset release --no-tests=error -j 1 -R '^startup_native_graphics_draw_(warp|hardware)$|^native_rtv_variant_(warp|hardware)$'Debug: 104 passed, 1 capability skip (startup_compute_dispatch_native_warp), 0 failed. Release: 4/4. The D3D12 debug layer was unavailable (0x887a002d). ## Base update (2026-11-28,fdae7f16) Merged the updatedcodex/native-graphics-integrationbase (97cde4d5, including #3091's247530b0and currentmain) into this branch. Thed3d12_draw.inlconflict keeps the new PSO recipe path and re-applies the recovered-geometry flag and revision cache invalidation to it. The fixed-mesh capture path is preserved. The native-graphics fixture respects the new disk-pair precedence; test-onlyX2W_TEST_NATIVE_GRAPHICS_PREFER_NATIVE(and the existing PSO-failure hook) forces the native candidate for the fallback cases. Tests atfdae7f16: - compiler suite 14/14 in Debug, includingnative_rtv_variant_{controls,warp,hardware}andnative_compile_dxil_watch; - runtime draw/indirect/stream/sampler suite 84/84, one WARP capability skip (startup_compute_dispatch_native_warp); - Releasestartup_native_graphics_draw_{warp,hardware}andnative_rtv_variant_{warp,hardware}: 4/4. The D3D12 debug layer was unavailable (0x887a002d). ## PSO-failure negative control (b409dc83) The control now begins with<key>.txtrenamed to.pending, so the first draw takes the native path. A test-onlyX2W_TEST_MANIFEST_BEFORE_FALLBACKmoves the valid manifest into place only when the failed candidate asks for its fallback. It asserts the injected candidate failure, the manifest publication before fallback, the recovered 16-red draw, unchanged manifest and stage bytes/mtimes, native-only refusal with the pair still pending and 32 clear pixels, plus the equivalent RTV-variant and missing-manifest controls. The earlier forced-native precedence is removed; production keeps the disk-first base behavior. Atb409dc83: 14/14 compiler tests in Debug, 84/84 runtime tests with one WARP capability skip, and 4/4 in Release on WARP and RX 9060 XT. Debug layer unavailable (0x887a002d). ## RTV late-manifest fix (dbca1851) Restored the ordinarymanifest_retry.due()reload before the native decision intranslation_for_targets. The previouselse ifwas unreachable while an RTV entry was unavailable, so a valid manifest published after the first draw was never loaded. Native compilation remains one attempt per RTV entry.ctest --preset dev --no-tests=error --output-on-failure -j 1 -R '^startup_(mrt_dxc|native_graphics_draw)_(warp|hardware)$': - Debug: 4/4 passed. - Release: 6/6 passed, includingnative_rtv_variant_{warp,hardware}. - Broader runtime suite: 84/84 with one WARP capability skip; compiler suite 14/14. The injected-failure controls remain green. Debug layer unavailable (0x887a002d).Base update (2026-11-28,
91d000a9)Merged
codex/native-graphics-integrationc23cbc36(including the reviewed #3091/#3094, sampler retirement and fixed-mesh sync) into the PSO fallback. The conflict keeps the translation revision bump and the pre-fallback geometry-flag derivation, adaptsprepare_draw_sampler_heap(self, ...), and keeps the test's mtime snapshots and fault set.Added a two-draw revision-invalidation control: a test-only revision bump between draws must create a second desktop PSO. Removing the revision from the PSO cache key makes the test fail with one pipeline instead of two.
Debug and Release:
startup_native_graphics_draw_{warp,hardware},startup_mrt_dxc_{warp,hardware}andnative_rtv_variant_{warp,hardware}pass 6/6 each. The D3D12 debug layer was unavailable (0x887a002d).Imported from R0Y00/Xbox2Windows. Originally posted by lambirou on 2026-11-27T17:17:35Z.
Note: the Windows checks workflow triggers only for pull requests to
mainandcpp-migration, so this branch-targeted PR has no CI run. The complete local receipt is in the description.Imported from R0Y00/Xbox2Windows. Originally posted by JVProg on 2026-11-27T17:18:34Z.
Hi @lambirou, I claimed #3134 shortly before this PR was opened and had been working on it locally. Rather than open a competing PR, I'm sharing what may be useful here.
One question about ordering. In
draw_translated,d16_srvs_ready,formatted_buffers_readyandfixed_vertex_viewrun againsttrbeforepipeline_for. With this change,pipeline_forcan replace*trwith the disk translation, so later binding would use data prepared for the native one. Is it guaranteed that both have matching bindings? I haven't reproduced a failure from this; it comes from reading the diff (I haven't built or run this branch).Two cases I didn't see in the diff. I tested these on my local implementation, not on yours:
R32G32B32A32_FLOAT): draw natively, publish the variant withcompile_dxil --watch --once, then inject the PSO failure. The disk readback matched the native one byte for byte. After removing the variant manifest, the draw was refused..ps.csowith a valid manifest: the translation loads, but creating the disk PSO fails. The target stayed clear and the invalid file was left unchanged.Both passed on WARP and on an AMD Radeon RX 9070 XT (driver 32.0.32029.2010) in Debug and Release. The D3D12 debug layer was unavailable (
0x887a002d). My base wasb80513fd.If these are useful, I can post the test code here.
I'm working with AI assistance.
Imported from R0Y00/Xbox2Windows. Originally posted by lambirou on 2026-11-27T18:10:57Z.
CI-equivalent smoke receipt for this branch-targeted PR. The
prpreset used by the Windows workflow for pull requests to main was built and run locally onnative/graphics-pso-fallback(06c7380b) with the change applied.41/41 passed, 0 failed (20.9 s). The 12
spirv_*_warptests are capability skips because SPIR-V tools are not installed on this host; they are skipped, not failed. Windows build 10.0.26300.10075, WARP. The targetedstartup_native_graphics_draw_{warp,hardware}receipt remains as described in the PR.Imported from R0Y00/Xbox2Windows. Originally posted by lambirou on 2026-11-27T19:16:33Z.
Hi @JVProg, yes, the ordering was a real gap: both translations are prepared for the same key, but nothing guaranteed matching bindings.
pipeline_forcan replace*tr, whiled16_srvs_ready,formatted_buffers_readyandfixed_vertex_viewran before it and later bindings used the native arrays.Fixed on
9360bcae: the PSO is created first, then all binding preparation is derived from the translationpipeline_forleaves intr. If the published fallback changesfixed_stream, the indexed-rectangle geometry key is recomputed before the draw.I also added both cases you described to
startup_native_graphics_draw_check.py:R32G32B32A32_FLOAT: native draw publishesreq_<key>.rtv,compile_dxil --watch --oncepublishes the variant, injected PSO failure recovers it with readback0000803f00000000000000000000803f; removing the variant manifest refuses with 32 clear pixels..ps.csowith a valid manifest: the translation loads, the disk PSO fails, the draw is refused with 32 clear pixels, and the invalid bytes and mtime are unchanged.Dev and release on WARP and the RX 9060 XT: native draw 2/2 in each preset; debug regression 8 run, 7 pass, one capability skip (WARP without 32-lane waves). Debug layer unavailable (
0x887a002d). If you still have your local test code, I would be glad to compare the RTV setup.Imported from R0Y00/Xbox2Windows. Originally posted by JVProg on 2026-11-27T19:53:29Z.
Thanks @lambirou. Here is the RTV block from my local test.
I haven't rebuilt or re-run this copy. The results in my earlier comment come from an earlier run on
b80513fdwith my implementation. The log strings it asserts are mine, so they would need to be changed to yours.Comparing it by reading it against your test on
9360bcae, the setup differs in two ways:pixel_stage()andWORDSfromnative_rtv_variant_check.py, so the four channels carry different raw bit patterns. Yours reuses the red shader and checks the exact expected bytes.Yours also checks things mine doesn't: modification times, and the exact clear value on refusal (mine only checks that the image differs from the native one).
RTV block
AI was used.
Imported from R0Y00/Xbox2Windows. Originally posted by lambirou on 2026-11-27T19:57:06Z.
Thanks, @JVProg. I ran your block against
9360bcaewith only the log strings adapted to our wording (candidate pipeline failed 0x80004005 (injected),published disk pair recovered,no valid published disk pair). It passes on WARP:fe7fffff15000000eb00000068000000;I kept our version in the PR because it reuses the cache that already holds the base pair and additionally asserts the exact clear value and the manifest/stage mtimes. Your block is complementary: it covers a different pixel payload and a cache without the published base pair. I can add it as a second case if you think that combination is worth pinning in CI; the branch is otherwise unchanged at
9360bcae.Imported from R0Y00/Xbox2Windows. Originally posted by KelboLive on 2026-11-27T21:03:21Z.
LGTM! The PSO fallback recovery is correctly implemented:
Key features:
Implementation notes:
This improves runtime stability by providing a reliable fallback when native shader compilation fails, which is essential for compatibility across different GPU configurations.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-27T21:25:56Z.
Review: COMMENTED
Independent Release
/O2retest on exact stack head9360bcae(tree7193cd488c831f84dec391e442c4fed45c321305). Builtcompile_dxil startup_stream_consumer d3d12_xs_shimand ranctest --test-dir <build> --no-tests=error -j 1 -V -R '^startup_native_graphics_draw_(warp|hardware)$'. 2/2 passed, zero skips. WARP and RTX both recovered the published pair to 16 red / 16 clear after injected native PSO failure, and the same RTV variant recovered its disk pair. Missing and invalid pairs and invalid disk PS blobs kept the target clear, native success still drew, and the cache preservation checks passed. Windows26200.9974, WARP10.0.26100.9818, RTX 4060 Laptop driver32.0.16.1656, SDK/DXC10.0.26100.0, D3D12 debug layer enabled.One by-inspection question remains outside the triangle and RTV receipts. If a direct rectangle changes from a fixed-stream native translation to a legacy disk translation, the recursive
pipeline_forstill receives the original geometry flag.draw_translatedonly recalculates the flag when that first PSO returns non-null. If disk geometry preparation fails with the old flag, can the caller still retry with the disk translation’s actual flag? Please check this path or derive the rectangle geometry flag from the recovered translation before creating its PSO.Imported from R0Y00/Xbox2Windows. Originally posted by JVProg on 2026-11-27T21:26:05Z.
Thanks @lambirou for running it. I'm happy to leave that choice to you. The part of my block that seems to add something is the variant case with no published base pair in the cache. Your version already checks the exact clear value and the mtimes.
AI was used.
Imported from R0Y00/Xbox2Windows. Originally posted by pigalot on 2026-11-27T21:35:10Z.
Review: APPROVED
I reviewed
9360bcaemerged over currentcodex/native-graphics-integrationb80513fd, the PR's base. The merge is clean andgit diff --cached --checkis clean.What I traced.
pipeline_fornow treats a failedCreateGraphicsPipelineStateon a native candidate as recoverable. It loads the published pair for the same key and RTV request into a freshTranslation, withcount = falseso the missing and ready counters don't move twice. It then bumpsrevision, swaps the pair intotrand recurses once. The recovered translation hasnative_candidate = false, so the recursion can't loop.draw_translated, the d16 views, formatted buffers, the fixed vertex view and the indirect checks all read the translation thatpipeline_forleaves intr. That answers JVProg's ordering question.translation_by_key(), so a swap made by one guest pipeline is seen by everyBoundPipelinewith that key. Therevisionterm in the PSO cache key is what stops another pipeline from reusing a native PSO it created earlier against the swapped-in disk bindings. The logic is right, but no test reaches it (see the mutants).What I ran. I did a full
devbuild, then randev: 104 of 105 pass, with 1 capability skip (startup_compute_dispatch_native_warp, WARP without 32-lane waves). The indirect refusal census tests are part of this set, so the new refusal precedence (described below) doesn't change any code they assert.release: I builtcompile_dxil startup_stream_consumer d3d12_xs_shimand ran^startup_native_graphics_draw_(warp|hardware)$. 2/2 pass.x2w-d3d12 debug layer: 0x00000000 enabled), and the newassert_debug_cleanpasses instartup_native_graphics_draw_hardware.Mutants in
src/startup_stubs/d3d12_draw.inl. For each, I rebuiltd3d12_xs_shim startup_stream_consumerindevand ranstartup_native_graphics_draw_warp:candidate.native_candidate = true;removed (no fallback, as on the base)if (!native_shaders_only())→if (true)load_translationrefuses in native-only mode anyway, and only the diagnostic changesrevisionterm removed from the PSO cache keyfallback.revision = tr.revision + 1→tr.revisionRestored and rebuilt afterwards; the tree is clean.
Non-blocking.
fixed_stream.tr = std::move(fallback)overwrites the candidate's rawvs/psblob pointers withoutRelease.Translationhas no destructor, so they leak once per key that falls back. That's small, but releasing them before the swap is cheap.bound.pipelines[key] = nullptris cached. Ifcompile_dxil --watchpublishes the pair later in the same process, that pipeline still won't recover. The old code behaved the same way, and #3134 asks only for an already-published pair, so this is a possible follow-up, not a gap in this PR.pipeline_unavailableinstead of, say,missing_guest_root. The census tests above still pass. I'm noting it so it's a known trade-off.Verdict: approve on
9360bcae. This targetscodex/native-graphics-integration, so I'm leaving the merge to the branch owner.Environment: Windows 11 25H2 build 26200.9974; MSVC 19.52.37029; Python 3.12.10; WARP and NVIDIA GeForce RTX 5090 (driver 32.0.16.1088); D3D12 debug layer enabled.
CI: none on this PR (the workflow runs only for
mainandcpp-migration).This reply was AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by KelboLive on 2026-11-27T23:55:51Z.
Agree with pigalot's APPROVED review: the fallback path is correct —
pipeline_fortreats a failed native candidate PSO as recoverable, loads the published pair into a fresh Translation with count=false, bumps revision to prevent stale reuse, and recurses once. The shared translation + revision cache key prevents cross-pipeline contamination.Imported from R0Y00/Xbox2Windows. Originally posted by lambirou on 2026-11-28T00:02:46Z.
@R0Y00 the rectangle geometry flag is now derived from the translation
pipeline_foractually holds. The function takes the rectangle kind and recomputesgeometry_rectafter a disk fallback, so the recursive call no longer reuses the native candidate's flag. The replaced candidate blobs are released before the swap.On the true → false case: a valid same-key disk pair cannot drop
fixed_streamwhile its shaders still declare an input layout. A hand-edited version 2 manifest withoutfixedvbreachesCreateGraphicsPipelineStatewith E_INVALIDARG; the caller now tries the disk translation's actual flag and refuses withpublished disk pair pipeline failedrather than retrying the GS with the stale flag. That diagnostic is the expected refusal for this malformed pair.Tests at
4df09294, Debug and Release, WARP and RX 9060 XT (driver 32.0.32029.2010):Debug: 104 passed, 1 capability skip (
startup_compute_dispatch_native_warp), 0 failed. Release:startup_native_graphics_draw_{warp,hardware}andnative_rtv_variant_{warp,hardware}4/4. The debug layer was unavailable (0x887a002d), so I do not claim debug-layer cleanliness.AI was used.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-28T00:39:29Z.
The runtime base #3094 is now
97cde4d5, and this PR conflicts in d3d12_draw.inl. The base now uses an already published disk pair before trying the native compiler on the first draw. Please update this PR on the current base and keep that precedence. The remaining PSO-failure control should start with no ready disk marker, make a valid disk pair available before fallback is attempted, and verify native-only refusal plus unchanged files. Keep the rectangle recomputation and exact-head WARP and hardware checks.Imported from R0Y00/Xbox2Windows. Originally posted by lambirou on 2026-11-28T00:53:20Z.
@R0Y00 merged the updated
codex/native-graphics-integrationbase97cde4d5into this branch atfdae7f16. The PR is clean and mergeable again.The
d3d12_draw.inlconflict was resolved by keeping the new PSO recipe path and re-applying the recovered-geometry and revision cache invalidation to it. The runtime's fixed-mesh capture path is preserved. The native-graphics fixture now respects the new disk-pair precedence; test-onlyX2W_TEST_NATIVE_GRAPHICS_PREFER_NATIVEand the existing PSO-failure hook force the native candidate for the fallback cases.Tests at
fdae7f16:native_rtv_variant_{controls,warp,hardware}andnative_compile_dxil_watch);startup_compute_dispatch_native_warp);startup_native_graphics_draw_{warp,hardware}andnative_rtv_variant_{warp,hardware}4/4.The debug layer was unavailable (
0x887a002d). AI was used.Imported from R0Y00/Xbox2Windows. Originally posted by akimfomin on 2026-11-28T00:54:00Z.
PortBridge's saved Git comparison was for the older
4df0929head. Your rebase atfdae7f16already resolves that conflict and explicitly forces the native route in the fallback fixture. The published positive and missing-pair controls cover the distinction I intended. No repeat requested.The cross-project complement remains XCL #2940, where a presented blob is stale but native creation succeeds. That should count one native create and keep that pipeline. In Xbox2Windows the forced create failure is a different outcome and the disk-pair recovery is the positive case. Our recorded comparison. If useful on a different open PR, a maintainer or agent can send the PR URL, target SHA and expected behavior in PortBridge #98.
Imported from R0Y00/Xbox2Windows. Originally posted by lambirou on 2026-11-28T01:00:22Z.
@R0Y00 the PSO-failure control now starts with
<key>.txtrenamed to.pending, so the first draw enters the native path rather than reusing the disk pair. A test-onlyX2W_TEST_MANIFEST_BEFORE_FALLBACKmoves the valid manifest into place only when the failed native candidate asks for its fallback.The test asserts, in order:
0x80004005;The test-only forced-native precedence from
fdae7f16is removed; production keeps the disk-first precedence. Atb409dc83: 14/14 compiler tests in Debug, 84/84 runtime tests with one WARP capability skip, and 4/4 in Release on WARP and RX 9060 XT. The D3D12 debug layer was unavailable (0x887a002d). AI was used.Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-28T01:04:42Z.
Review: CHANGES_REQUESTED
Independent review of
fdae7f168a. The PSO fault fixture proves the candidate was attempted and then recovered the published pair. Debug and Release /O2 each had 17 passes and one inbox WARP wave32 skip in the fixed mesh, first native draw, stream, native Dispatch and raw pixel UAV/atomic selection.The updated RTV flow regresses late manifests. In translation_for_targets, an unavailable variant takes the state != 1 branch on every draw. The following else if (entry->manifest_retry.due(...)) is therefore unreachable in the missing state. With no native worker it republishes the marker and never reads the valid manifest when it appears. The existing startup_mrt_dxc_warp and startup_mrt_dxc_hardware both reproduce this on the exact head: the first and second draws both log no RTV translation after the fixture has published the disk marker and waited 1.1 s. Windows 11 26200.9974, WARP 10.0.26100.9818, RTX 4060 Laptop 32.0.16.1656, debug layer enabled.
Please retain the ordinary retry before the native decision, and keep native compilation one attempt per RTV entry. Keep the new injected-failure controls, and rerun these two existing late-publication controls alongside them.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-28T01:11:56Z.
I rechecked
b409dc83. The delayed publication inside the fault fixture now proves the intended native-first failure and disk recovery. The normal late RTV publication regression still reproduces separately: both native graphics tests pass, both startup_mrt_dxc tests fail.A small local resolution passed all four on WARP and RTX. I restored translation_for_targets from #3094 at
97cde4d5, kept only entry->rtv_request = request immediately after entry->key = key, and kept the rest of b409dc83's PSO fallback and fixture changes. This leaves initial translation and marker publication inside the new-entry branch and the existing entry's due retry in its reachable else-if. Reproduction: ctest --preset dev --no-tests=error --output-on-failure -j 1 -R '^startup_(mrt_dxc|native_graphics_draw)_(warp|hardware)$'.Imported from R0Y00/Xbox2Windows. Originally posted by lambirou on 2026-11-28T01:12:31Z.
@R0Y00 fixed the late-manifest regression on
dbca1851:translation_for_targetsnow performs the ordinarymanifest_retry.due()reload before the native decision. The previouselse ifsat after anentry->state != 1branch that is always taken while the variant is unavailable, so it was unreachable. Native compilation remains limited to one attempt per RTV entry.I ran your exact controls:
startup_mrt_dxc_warp,_hardware,startup_native_graphics_draw_warp,_hardware).native_rtv_variant_warpand_hardware.The new injected-failure controls still pass. D3D12 debug layer unavailable (
0x887a002d). AI was used.Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-28T01:21:24Z.
Review: APPROVED
Approved after independent review of
dbca1851c5on runtime base97cde4d5. The ordinary late RTV retry runs before the one-shot native attempt. The exact head passed the previously failing late-publication control on both adapters. The fault fixture also proves native PSO creation was attempted before the disk pair was published, and checks successful recovery, native-only refusal, unchanged cache files and the RTV variant.Debug and Release /O2 each passed all six selected source-built tests, no skips. Windows 11 26200.9974, RTX 4060 Laptop driver 32.0.16.1656, WARP 10.0.26100.9818, D3D12 debug layer enabled in the graphics fixtures.
Imported from R0Y00/Xbox2Windows. Originally posted by JohnConnorNPC on 2026-11-28T06:16:48Z.
Thanks for the work on this. One thing blocks merging at
dbca1851: the last commit moved the RTV publish and its log line out of the new-entry block. Every draw on an unavailable RTV variant now statsreq_<key>.rtvunderdraw_lockand writes an unbudgeted "no RTV translation" line to stderr and the log file. On the base (97cde4d5) that happened once per entry. The block sits outside#ifdef X2W_NATIVE_SHADERS, so it hits every build, and a variant that never gets translated floods the log for as long as the title draws.Could you restore
translation_for_targetsfrom the base and keep onlyentry->rtv_request = request, as R0Y00 suggested at 01:11? Two smaller points: the missing-pair, invalid-pair and invalid-PS cases never reach the fallback (they also pass on the base runtime, and "published disk pair pipeline failed" is asserted 0 times), and revision invalidation is still unpinned by a test (the surviving mutants from the earlier review).This comment was AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by lambirou on 2026-11-28T10:39:44Z.
Fixed at
4b3a4f9a.translation_for_targetsis restored from97cde4d5, with onlyentry->rtv_request = requestadded afterentry->key = key. The.rtvpublish, native attempt andno RTV translationlog are back inside theif (!entry)block; an existing entry only reloads on itselse if (manifest_retry.due())retry. A variant that never translates no longer stats the marker or logs on every draw.published disk pair pipeline failedas well as the native failure and the clear target.Release and Debug:
startup_mrt_dxc_{warp,hardware}andstartup_native_graphics_draw_{warp,hardware}pass 4/4 each. The new disk-PSO-failure case passes on WARP and the RX 9060 XT.The revision-invalidation path is still unpinned by a targeted test; I left that as the remaining smaller gap rather than changing the runtime further.
Imported from R0Y00/Xbox2Windows. Originally posted by lambirou on 2026-11-28T10:49:14Z.
Additional RTV checks on
4b3a4f9a:native_rtv_variant_warpandnative_rtv_variant_hardwarepass 2/2 in both Debug and Release, alongside the 4/4 MRT/native draw set.Imported from R0Y00/Xbox2Windows. Originally posted by RonLogic on 2026-11-28T12:28:36Z.
I independently tested
4b3a4f9a1228167a71f19b65020d7747e9470ad8(tree34d6209b) on #3094 base97cde4d5.Debug and Release each passed 7/7, no skips, on Windows 26300.10075 with the D3D12 debug layer enabled. Adapters were RTX 4070
10de:2786(driver32.0.16.2124) and inbox WARP1414:008c(10.0.26100.10068). DXC was 1.9.2602.17.published disk pair pipeline failed. It recorded no draw and preserved 32 clear pixels on both adapters.I used Codex to run and verify the local checks.
Imported from R0Y00/Xbox2Windows. Originally posted by lambirou on 2026-11-28T15:37:54Z.
Refreshed onto the merged native graphics base
c23cbc36(includes #3091/#3094, sampler retirement and fixed-mesh sync). Head:91d000a9.prepare_draw_sampler_heap(self, ...).Debug and Release:
startup_native_graphics_draw_{warp,hardware},startup_mrt_dxc_{warp,hardware}andnative_rtv_variant_{warp,hardware}pass 6/6 each. #3139 isCLEAN/MERGEABLEat91d000a9.Imported from R0Y00/Xbox2Windows. Originally posted by lambirou on 2026-11-28T15:42:26Z.
Additional sampler regression on
91d000a9:startup_sampler_heap_{warp,hardware}andstartup_inline_sampler_{warp,hardware}pass 4/4 in Release after rebuildingoffscreen_check. Two other sampler selections (startup_translated_sampler_bindings,startup_sampler_comparison) are separate executables that are not built in this worktree; they are not failures from this branch.Imported from R0Y00/Xbox2Windows. Originally posted by lambirou on 2026-11-28T15:43:07Z.
Follow-up: I built the two remaining sampler executables.
startup_translated_sampler_bindingsandstartup_sampler_comparisonalso pass 2/2 in Release. The full available sampler set is now 6/6 on91d000a9.Imported from R0Y00/Xbox2Windows. Originally posted by lambirou on 2026-11-28T15:43:51Z.
@R0Y00 #3139 is refreshed on the merged native graphics base
c23cbc36at91d000a9. It isCLEAN/MERGEABLEand approved. Validation: 6/6 native draw/MRT/RTV in Debug and Release, plus 6/6 sampler checks in Release; the revision-invalidation mutant is pinned and killed. Ready to merge.Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-28T19:20:59Z.
This merged into
codex/native-graphics-integrationat 17:58 UTC, after that branch had reachedmainthrough #3094 (14:07 UTC), so7291aef2is not onmain(git merge-base --is-ancestor 7291aef2 origin/mainis false on61ba40d1). #3134 is still open. The commit applies cleanly to currentmain(git merge-tree --write-tree --merge-base 7291aef2^1 origin/main 7291aef2, 3 files, +298/-44); the draft #3248 includes an earlier revision of this branch.A carry PR to
mainis needed. @lambirou, do you want to open it, or should I?