D3D12.X: a superseded target the title binds, clears or moves is mapped again #3192
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3192"
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 ivall/xcl. Originally posted by Kalmarv on 2026-11-28T17:52:01Z.
A placed render target or depth buffer that a newer placement supersedes (
placements.rs,XCL_PLACE_RETIRE, on by default) has its tiles unmapped once the queues have passed, andplacements::note_usemaps them again when the title uses it again. A use was only seen in a legacyResourceBarrierand in the copies. A title that moves its textures with the barrier groups of list slot #146 and then binds and clears such a target was never seen: the target stayed without tiles, every write to it was dropped and every read of it returned 0.A use is now also a texture barrier in list #146's groups,
OMSetRenderTargetswith its RTVs or DSV,ClearRenderTargetViewandClearDepthStencilView. All of them record into a list, so the mapping is queued before that list's submit waits for the tile mappings (vram::before_execute). An RTV or DSV the title copies (CopyDescriptorsSimple,CopyDescriptors) names what its source names, as one made at that handle does: otherwise a bind or clear through a copied view looks up what the destination handle named earlier (@andrewDoing's controls below). The handles of both kinds are kept inplacements, not looked up inpresent's table of RTVs, which holds nothing withpresent = "off"(@thehollowedone's reproduction below).Related: #3179 does the same for textures bound through descriptor tables. This PR is the other side, the calls that write a target; neither covers the other's calls. Both add
placements::any_superseded(), so whichever is merged second needs a rebase that keeps one copy; I will do that for this one.What is in it
hle/d3d12x/placements.rs:any_superseded()(one atomic load: the calls below do nothing more while no target is superseded) and the RTV and DSV handles of placed textures (note_view,note_view_use,views_copied: one table of addresses, no references held). Unit testa_view_handle_names_the_placed_texture_it_was_last_made_of(made at a handle, copied to it, copied from a handle that names nothing).hle/d3d12x/list_x.rs:uav_barrier_x(list #146) notes the textures of its texture barrier groups (barrier_group_textures: read only while a target is superseded, every group of the call and every barrier of a group, groups that are not readable memory are passed over);clear_depth_stencil_xnotes its DSV. Unit testthe_texture_barriers_of_barrier_groups_name_their_textures(a 257th group and a 4,097th barrier among them).hle/d3d12x/real.rs:cl_om_set_render_targetsnotes the RTVs the list now holds and its DSV,cl_clear_rtvits RTV,dev_create_rtvanddev_create_dsv_xfeed the handle table; the two descriptor copy hooks pass RTV and DSV copies to it (target_views_copied, ranges walked bydepth_uav::pieces, which ispub(super)for it). GPU testssuperseded_target_tests::gpu_a_superseded_render_target_the_title_binds_clears_or_moves_is_mapped_again(R32_FLOAT) andgpu_a_superseded_depth_buffer_the_title_binds_or_clears_is_mapped_again(D16): they place a target on title pages, place a smaller one over its last page so that it is superseded and loses its tiles, call each hook on an adopted list (one bind through an RTV copied withCopyDescriptorsSimple, one clear through a DSV copied withCopyDescriptors), and require the target to have tiles again after each call and to read back the value it was then cleared to. The render-target test first dropspresent's entries of its RTVs, which is whatpresent = "off"leaves. They printSKIPPEDwithout tiled resources.Tested
ee8bb3d3since 2026-11-28 21:25Z (review changes). The suite, GPU-test and regression-run lines below name2d632bd2, the head before it, and are being rerun. Onee8bb3d3so far (debug, RTX 5070 Ti and WARP):cargo test -p xcl --lib -- superseded_target a_view_handle the_texture_barriers copy_descriptors_remaps --test-threads=1: 6 passed, 0 failed on each; the same tests on the runtime code of2d632bd2(superseded_target the_texture_barriers): 2 passed, 2 failed on each.CARGO_PROFILE_DEV_DEBUG=0), release smoke; DXC 1.9.2609 viaXCL_DXC_DIR.cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4 --skip a_refused_gpu_upload_segment_becomes_custom --skip mixed_window_keeps_its_bytes_and_the_gpu_sees_every_segment --skip failed_restore_stops_before_importing_an_unbacked_windowon2d632bd2: 2594 passed, 1 failed, 49 ignored. The same command onmain765b2c5b: 2590 passed, 1 failed, 49 ignored. The three skippeduma_drivertests ended the lib test process on NVIDIA onnvidia-dev54225f58, whichmainnow contains (reported on #3041; #3187).765b2c5bas well:a_preparation_worker_also_builds_a_split_programs_whole_form.SKIPPED: 8 no wave64; 1 const_mask, wave64: no wave64; 1 f32 arithmetic, wave64: no wave64; 1 f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's)); 1 f16 arithmetic, wave64: no wave64; 1 f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's)); 1 f16 packed, wave64: no wave64; 1 f32 compares, wave64: no wave64; 1 integer arithmetic, wave64: no wave64; 1 f64, wave64: no wave64; 1 mask_ff0_flbit, wave64: no wave64; 1 f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's)); 1 f32 conversions, wave64: no wave64; 1 integer carries, wave64: no wave64; 1 f32 rounding, wave64: no wave64; 1 f32 transcendentals, wave64: no wave64; 1 f32 three-source, wave64: no wave64; 1 no heap windows (opt-in: XCL_HEAP_WINDOWS=1); 1 no heap windows.placements::tests::a_superseded_target_used_again_is_mapped_again, release (cargo test --release -p xcl --lib superseded_target -- --test-threads=1) on2d632bd2: 3 passed, 0 failed on the RTX 5070 Ti (3 runs, 0 skipped) and 3 passed, 0 failed on WARP (XCL_ADAPTER=warp, 0 skipped).843d8685, the same command with the new note calls taken out (WARP): 1 passed, 2 failed, withstill without tiles after ["OMSetRenderTargets", "ClearDepthStencilView", "ClearDepthStencilView with a copied DSV"]andstill without tiles after ["OMSetRenderTargets", "OMSetRenderTargets with a copied RTV", "ClearRenderTargetView", "a texture barrier in list #146's groups"].843d8685, the same command with the copies not followed (target_views_copiedreturning at once, WARP): 1 passed, 2 failed, withstill without tiles after ["ClearDepthStencilView with a copied DSV"]andstill without tiles after ["OMSetRenderTargets with a copied RTV"].Regression run
150 s runs after the startup shader preparation, same title, same env (
XCL_UMA_WINDOWS=16 XCL_HEAP_WINDOWS=1 XCL_DIRECT_DXIL=all XCL_DIRECT_SPLIT_INSTRUCTIONS=0 XCL_PSO_JOURNAL=0 XCL_DRED=1 XCL_GPU_WAIT_TIMEOUT_MS=120000, DXC 1.9), the same graphics pipeline history at the start.main's run uses a DXIL cache precompiled for it (xcl shaders --precompile --pipelines --used-only --windows 16), the head's a hard-link copy of that folder taken aftermain's run.The two runs below are not of the same scene, so their frame and commit lines do not compare. The harness presses the gamepad at times counted from the process start (the last at 197 s).
main's run prepared shaders for 459 s, so no press reached the title and ended with 1440 textures and 6186 MB of video memory on the first screen; the head's run prepared for 166 s (the driver blobs were on disk by then), got the presses and ended with 57719 textures and 14045 MB of video memory in the loaded world. Amainrun that gets the presses as well is pending; thePR descriptioncheck stays red on the frame and commit comparison until it replaces the first block.main(daae0330, the parent of merge765b2c5bthat has its tree):This PR's head:
The head's run does not show the change being reached: its log has no
a superseded texture is used againline (main's: 0). The run of this PR's earlier headfe9039deonnvidia-dev54225f58(4 UMA windows, no startup preparation) had 64 such lines (the log prints at most 64), 16-bit depth targets and R32_UINT targets with unordered access; why this run has none was not looked into.Not tested
mainin the same scene, and the change being reached in a title run onmain(see Regression run).CopyDescriptorsand a DSV copied withCopyDescriptorsSimplein this PR's tests: they take the other pairing, and both hooks go through the sametarget_views_copied(@andrewDoing ran both pairings on2d632bd2, the head before this one). Whether the title copies RTVs or DSVs at all was not counted.present = "off"set in a title's config: the GPU test only emptiespresent's table (@thehollowedone's child-process test with the setting was not taken).AI use
🤖 Generated with Claude Code
Imported from ivall/xcl. Originally posted by andrewDoing on 2026-11-28T18:15:52Z.
Copied DSVs can remap the previous destination resource. At
fe9039deefe2cc15c2916380367202294b1705c7on RTX 5070 12 GB / 616.92, I created D16 depth targets A and B in separate address ranges, superseded each with its own placement, and confirmed both were unmapped. The destination DSV initially named A and the source DSV named B.I then explicitly remapped both resources using direct descriptors before any GPU write. A clear of A to 0.25 followed by a clear of the replaced destination to 0.75 gave fenced D16 readbacks of
0x4000for every texel of A and0xbffffor every texel of B (262,144 texels per target). This confirms the native copied handle names B even when the placement bookkeeping remaps A. Six fresh processes, zero skips; no write to an unmapped resource.Both copy hooks already forward DSV changes to
depth_uav; keeping the placement DSV association in sync there as well would address this case. No retail workload tested.AI use: OpenAI Codex (GPT-6) prepared and ran the test-only fixture and wrote the report.
Imported from ivall/xcl. Originally posted by andrewDoing on 2026-11-28T18:17:36Z.
RTVs are affected too at
fe9039deefe2cc15c2916380367202294b1705c7on RTX 5070 / 616.92. RTVs use the existingpresent::rtv_resourceassociation, separate from the new DSV table.I repeated the DSV replacement control with two independent R32_FLOAT targets. After both were superseded and unmapped, recreating B's RTV at A's former handle and binding it through OMSetRenderTargets remapped B only. Replacing that same handle via CopyDescriptorsSimple or CopyDescriptors (one range, one descriptor) instead remapped A only; B remained unmapped.
Before each GPU write I restored both targets through direct handles. A clear of A to 0.25 followed by a clear of the replaced destination to 0.75 gave 0.25 on A and 0.75 on B across all 262,144 texels of each, for all three replacement methods. Six fresh processes, zero skips. The copied native RTV thus points at B while the bind's resource lookup still selects A. Both RTV and DSV copy bookkeeping merit coverage when fixing the destination association. No title run or unmapped write.
AI use: OpenAI Codex (GPT-6) prepared and ran the native controls and wrote this follow-up.
Imported from ivall/xcl. Originally posted by Aniseto on 2026-11-28T18:20:51Z.
Ran the superseded-target remapping tests at
fe9039deon an NVIDIA Blackwell desktop part; both GPU tests ran here, with no SKIPPED line.System
Results
XCL_ADAPTER=NVIDIA cargo test -p xcl --lib gpu_a_superseded_render_target_the_title_binds_clears_or_moves_is_mapped_again -- --test-threads=1: 1 passed, 0 failed, 0 ignored.XCL_ADAPTER=NVIDIA cargo test -p xcl --lib gpu_a_superseded_depth_buffer_the_title_binds_or_clears_is_mapped_again -- --test-threads=1: 1 passed, 0 failed, 0 ignored.What this adds
Both device-backed tests pass on tiled resources: a superseded render target and depth buffer get their tiles mapped again after the title binds, clears or moves them. The thread has no comments yet, so this is the first datapoint in it and the first from an RTX 5070 Ti. These are synthetic device tests, not a title run.
Not tested
A retail title, a paired smoke run, the full workspace suite, AMD and Intel GPUs, native wave64 hosts, Wine, release profile, game data.
AI-assisted (OpenCode), model: DeepSeek V4.1 Flash Free - ran the commands above on this machine and wrote this report; no game data was used.
Imported from ivall/xcl. Originally posted by andrewDoing on 2026-11-28T18:36:01Z.
A candidate fix for the copied-RTV/DSV remapping findings is included below. It applies to
fe9039deefe2cc15c2916380367202294b1705c7withgit apply. Both native copy hooks propagate the source association to the destination and clear a stale destination when the source has no association. Ranged copies follow the existing range walker with the device's increment for that heap type. The RTV table takes its own COM reference and releases displaced resources after unlocking.On Windows with an RTX 5070 12 GB, direct recreation,
CopyDescriptorsSimple, andCopyDescriptorsnow remap B only when the destination changes from A to B. All 12 fresh-process RTV/DSV bind and fenced readback controls passed. With a valid source view absent from XCL's lookup table, the stock head wrongly remapped A in all four view/API combinations. The patch leaves A unmapped in all four. Every clear reached the live native source resource (16,384/16,384 pixels per case).The 13 placement tests passed, including the added CPU regression with different source/destination range boundaries, two untracked sources and an untouched gap. The existing depth-twin descriptor-copy control also passed. Native ranged controls used a single range; the multi-range result is from the CPU test. Scope was synthetic descriptor copying and remapping. Full workspace and title runs were outside this check.
Applyable four-file patch including regression test
AI assistance: OpenAI Codex (GPT-6) prepared the candidate, ran the controls and drafted this report.
Imported from ivall/xcl. Originally posted by Kalmarv on 2026-11-28T20:05:19Z.
@andrewDoing thanks, both findings are right: an RTV or DSV written by
CopyDescriptorsSimple/CopyDescriptorskept whatever its handle named before, so a bind or clear through it mapped the wrong target again (or none). For DSVs that was the case listed under Not tested; for RTVs I had not seen it (present's table has never followed copies).Fixed in
2d632bd2(squashed into the PR's commit, which is now onmain): the two copy hooks pass RTV and DSV copies to both tables (present::rtvs_copied,placements::dsvs_copied), each destination naming what its source names, or nothing. I wrote it against the tables as they are here and did not take your patch, which also movesdepth_uav's copy functions: that module keeps its own path. The two GPU tests now also bind through an RTV copied withCopyDescriptorsSimpleand clear through a DSV copied withCopyDescriptors; on2d632bd2(release, RTX 5070 Ti,cargo test --release -p xcl --lib superseded_target -- --test-threads=1) 3 passed, 0 failed; with the copies not followed (WARP) 1 passed, 2 failed, withstill without tiles after ["OMSetRenderTargets with a copied RTV"]andstill without tiles after ["ClearDepthStencilView with a copied DSV"].Edit: the first push of this,
843d8685, crashed an existing test (copy_descriptors_remaps_xbox_extra_cbv_srv_uav_to_pc_enumcopies an RTV on a fake device with two slots, and the new code asked it for the handle step);2d632bd2asks the device for the step only when a range holds more than one view. The description now has the suite on2d632bd2and onmain, and its regression run; themainside of that pair is still to be rerun (see there).Not covered: the other pairing on a GPU (an RTV through
CopyDescriptors, a DSV throughCopyDescriptorsSimple); both hooks share one function.Written with Claude Code (Claude Fable 5).
Imported from ivall/xcl. Originally posted by KDenKC on 2026-11-28T20:14:03Z.
@Kalmarv we ran the whole suite of your head on an RTX 3090 against its base on the same machine: no failure the base doesn't have. All 4 new tests pass:
list_x::tests::the_texture_barriers_of_barrier_groups_name_their_texturesplacements::tests::a_dsv_handle_names_the_placed_texture_it_was_last_made_ofreal::superseded_target_tests::gpu_a_superseded_render_target_the_title_binds_clears_or_moves_is_mapped_againreal::superseded_target_tests::gpu_a_superseded_depth_buffer_the_title_binds_or_clears_is_mapped_againTested:
fe9039deand its basenvidia-dev54225f58.XCL_*set.cargo test --workspace --no-fail-fast -- --test-threads=4 --skip uma_driver::tests::a_refused_gpu_upload_segment_becomes_custom --skip uma_driver::tests::mixed_window_keeps_its_bytes_and_the_gpu_sees_every_segment --skip uma_driver::tests::failed_restore_stops_before_importing_an_unbacked_windowtitle_textures: one0x8007000Ein the full run, which passes alone, and threePoisonErrorfrom it;vram0x8007000E;e2etest_title_runs_and_game_folder_is_untouched.Also on a tree with #3179: cherry-picked onto
nvidia-dev+ #3179, the two PRs merge in text, but both addplacements::any_superseded()(identical bodies), so that tree needs one of the two removed to build. With that,cargo test -p xcl --lib -- placementsgives 17 passed, 0 failed (both PRs' placement tests).Not tested: a title run; a release build; AMD / Intel.
Your loyal testing minion, as ever.
AI use: an agent swarm: Claude Fable 5.2, Claude Opus 5.5, GPT-6.2-Sol and Gemini 4 Neon.
Imported from ivall/xcl. Originally posted by andrewDoing on 2026-11-28T20:34:54Z.
Verified the two outstanding GPU pairings on the author’s current implementation,
2d632bd2ac4f3492f886a92424189c9b51530538, RTX 5070 / NVIDIA 616.92. Only test fixtures were added.The destination initially named superseded target A, and the source named superseded target B. Both started unmapped. Binding the copied destination remapped B only in both cases:
CopyDescriptorsCopyDescriptorsSimpleEach A/B readback independently checked all 262,144 texels. Direct recreation and the converse API pairings gave the same results. The original head
fe9039dehad remapped A only through both copy APIs. After checking the initial mapping, the fixture explicitly remapped both resources through direct handles before issuing clears.Four further cases copied a valid native descriptor whose source association was intentionally absent from XCL’s table. For both copy APIs and both view types, binding left stale A unmapped and all 16,384 pixels of the actually named live target received the clear. 16 fresh-process cases passed, zero skips. This covers normal single-descriptor replacement, including a single range; multi-range copies and retail rendering were outside this run.
AI use: OpenAI Codex adapted the prior native fixture to the head’s four-slot test heap, ran the controls and prepared the report.
Imported from ivall/xcl. Originally posted by thehollowedone on 2026-11-28T20:39:02Z.
Independent check of #3192 head
2d632bd2on Windows 11 build 26300, RTX 3080 Ti / 621.35, Ryzen 7 9800X3D, rustc 1.99.1 MSVC.cargo test --offline --locked -j 4 -p xcl --lib superseded_target -- --test-threads=1 --nocapture: 3 passed, 0 failed, 0 ignored, zero skips on the unchanged head. The GPU render-target and depth-buffer cases both ran.I found two remaining paths that can leave a superseded target unmapped:
note_usenever runs while the global UAV barrier still does. I added 257-group and 4,097-barrier controls to the existing unit test. On the unchanged head, the first control failed 0/1 ([]versus[0x4000]). With the small candidate below, both controls and the existing assertions passed 1/1. The candidate also avoids quadraticVec::containswork for distinct resources. This is synthetic coverage; I did not measure a title batch of that size.present::note_rtvrecords no RTV association whenpresent = "off", a supported per-title setting. The new clear and bind remapping reads only that association, so it cannot restore tiles for an RTV in that mode. A placement-owned RTV lookup independent of presentation capture, with a fresh-processpresent = "off"bind/clear regression, would cover direct and copied views. This second point is source-traced, not runtime-tested.Tested candidate for the list #146 boundary
Update — GPU reproduction of point 2. I ran the existing superseded-render-target fixture in an isolated child test process with the documented
present = "off"setting. On unchanged head2d632bd2, the new focused test failed 0/1 with the direct RTV bind, copied RTV bind, and RTV clear all still unmapped; the texture-barrier control remapped. Recording RTV associations despite presentation being off made that same test pass 1/1, andcargo test --offline --locked -j 4 -p xcl --lib superseded_target -- --test-threads=1then passed 4/4, zero skips. Same Windows 11 / RTX 3080 Ti setup as above. The child process keeps the altered global config out of other workspace tests.Tested presentation-off reproduction and minimal functional candidate
The three-line
present::note_rtvchange proves the cause but would retain a COM reference for every RTV in presentation-off mode. For a memory-conscious production fix, keep the placement lookup independent of presentation and retire its handle associations with descriptor-heap/resource lifetime; preserve the copy hooks' source-to-destination updates. Production ownership detail (source review). Keep an RTV slot’s weak(resource address, placement sequence)in the placement registry, populated at view creation and by both descriptor-copy APIs even before the resource is superseded. A null or untracked source clears the destination. Validate the sequence and!releasedwhile holding the same registry lock used foruse_again, so an old view cannot remap a different resource later allocated at that address. Register each RTV heap with a generation and retire only that generation’s slots after its final nativeRelease; a delayed release must not erase entries of a new heap reusing its address. This keeps the lookup independent of presentation and bounds its metadata to live heap slots. The present-off GPU reproduction above covers the remap symptom; heap and address reuse still need a targeted regression on a candidate implementation.\n\nI did not run the full workspace or paired title smokes on either local candidate. AI use: Codex (GPT-6.2 Astra) independently traced the original paths; Codex (GPT-6.2 Sol) checked them, wrote and ran the RTX regressions/candidates, and drafted this report.Imported from ivall/xcl. Originally posted by throny on 2026-11-28T21:07:58Z.
merge-check claim
head:
2d632bd2acImported from ivall/xcl. Originally posted by Kalmarv on 2026-11-28T21:18:21Z.
@thehollowedone thanks, both hold:
barrier_group_texturesstopped at 256 groups and at 4,096 barriers a group, and the RTV binds and clears found their target throughpresent's table, which holds nothing withpresent = "off".Changed in
ee8bb3d3(squashed into the PR's commit):HashSetinstead ofVec::contains, as in your candidate. The unit test has a 257th group and a 4,097th barrier.placements(note_view, fed byCreateRenderTargetView,CreateDepthStencilViewand both descriptor copies). The binds and clears look only there, so they no longer depend on presentation, andpresent.rsis not touched by this PR any more (its table follows no copies, as onmain). The GPU render-target test now dropspresent's entries of its RTVs before the title's calls, which is whatpresent = "off"leaves; I did not take the child-process test.Run on
ee8bb3d3so far (RTX 5070 Ti and WARP, debug):cargo test -p xcl --lib -- superseded_target a_view_handle the_texture_barriers copy_descriptors_remaps --test-threads=1: 6 passed, 0 failed on each. The new tests on the previous head's runtime code (2d632bd2with only the test changes): 2 passed, 2 failed on each, withleft: [],right: [8192, 12288]at the 257-group assertion andstill without tiles after ["OMSetRenderTargets", "OMSetRenderTargets with a copied RTV", "ClearRenderTargetView"].Not run yet on
ee8bb3d3: the whole suite and the regression run; the description gets both when they are done, and until then its numbers are of2d632bd2.@throny the head is now
ee8bb3d3.Written with Claude Code (Claude Fable 5).
Imported from ivall/xcl. Originally posted by throny on 2026-11-28T21:37:02Z.
merge-check claim
head:
ee8bb3d376The head moved while my suite ran on
2d632bd2(clean there: 2598 passed, 0 failed, 49 ignored on mainbeeb81be); rerunning on this head.Imported from ivall/xcl. Originally posted by KDenKC on 2026-11-28T21:41:03Z.
merge-check
base:
7db2f391cehead:
ee8bb3d376merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2590 passed, 5 failed, 49 ignored (base
7db2f391on the same machine: 2586 passed, the same 5 failed, 49 ignored); SKIPPED: 30 lines, identical to the base: 21 "no wave64", 3 f16/f32 per-lane forms refused (#1426 semantics), 2 "no heap windows", 1 driver cache cannot be disabled (no Developer Mode), 3 no D3D12 debug layer; failing: title_textures::tests::placed_title_textures_share_vram_and_preserve_pixels (subtract overflow, title_textures.rs:6198) and the 3 stream_recheck_* tests it poisons, e2e test_title_runs_and_game_folder_is_untouched ("Invalid bitcode signature" on this VM): all 5 fail on the base too. This PR's 4 new tests ran and pass (the two GPU ones are not skipped). The run skips the 3 coherent-window remake tests (uma_driver::tests) that kill the lib binary on 621.x, on base and merge alike.review: whole diff of the merge result read. (1) #3179 adds its own placements::any_superseded(): whichever of #3179 / #3192 merges second fails to build (a duplicate definition, not a git conflict); one copy must go. (2) note_view takes the placements registry lock and the view table lock on every CreateRenderTargetView / CreateDepthStencilView, even with nothing superseded; view creation is not per draw, so small (not measured). The table holds addresses only, no references. (3) The list #146 barrier-group walk has no count limit now; readable() checks the group array and each barrier array before they are read, and the walk is skipped while nothing is superseded. Not covered here: a title that takes the barrier-group path (no title on this machine).
performance: on by default (XCL_PLACE_RETIRE); the new work runs only while a superseded target exists, apart from the two locks per RTV/DSV creation. Not measured: this machine has no title, so there is no smoke from us.
verdict: not yet: Tier 2 needs the 60 s smoke (base vs merged) on a title, and this machine has none; no new failures, no blocking finding in the diff
hardware / tool and model: NVIDIA GeForce RTX 3090 24 GB (VM), driver 32.0.16.2124, Intel i7-10700T x8, Windows 11 build 26300.9974, Rust 1.99.1, debug / Claude Code: Claude Opus 5.5 ran the merge, build and suite and read the diff; Claude Fable 5.2 checked the report
(This replaces our claim above. The smoke we mentioned there is not coming from us: the RTX 5090 is taken up by other work, so this check is the suite on an RTX 3090 only.)
Imported from ivall/xcl. Originally posted by throny on 2026-11-28T21:41:34Z.
merge-check
base:
7db2f391head:
ee8bb3d376merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2598 passed, 0 failed, 49 ignored on the merge result with main
7db2f391(27 SKIPPED lines); the same counts on the previous head2d632bd2with mainbeeb81be, whose base alone gave 2594 passed, 0 failed, 49 ignored. I did not run7db2f391alone.review: the full read was of the previous head
2d632bd2; of this head I read the difference to it. That difference answers the two open points of the earlier review: one table now holds render-target and depth views alike and no longer depends on the present path keeping the view (so it works with present = "off"), and the limits on barrier groups and barriers per group are gone, with a test for the 257th group and the 4097th barrier. What the PR covers beyond #3179 (descriptor tables only): binding render targets and the depth view, the two clears, texture barriers in the list's barrier groups, and copies of view descriptors, which now carry the target's name over. Not covered by either: resolves and unordered-access clears. No ping-pong: using a superseded target maps it again without unmapping the newer one; only a new placement supersedes again. Not fixed and not new: a list that bound a target before the newer placement but is submitted after the unmap still draws to an unmapped target. Two things block today. (1) #3179 and this PR each add the functionany_supersededto placements.rs; a merge of both has it twice and does not build (git reports no conflict), so the second to land must drop its copy. (2) The regression run in the description does not meet the rule and did not reach the change: its log has no "used again" line, the frames are 1868 against main's 4377, and the description check is red.performance: one atomic load per call while nothing is superseded, a table update per view-descriptor copy. No translator source. A world run on this card (RTX 4080, where
XCL_PLACE_RETIRE=0makes much more of the frame lit and #3179 alone did not) is what I do next and post here.verdict: not yet: a regression run that reaches the change and meets the rule, and the duplicate function settled with #3179; the code reads as sound.
hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300, Rust 1.100.0, debug. Claude Code; merge, build and suite run by Claude Fable 5.2, diff review by Claude Opus 5.5 (every hunk read; nothing run on the GPU beyond the suite).
Imported from ivall/xcl. Originally posted by throny on 2026-11-29T02:20:33Z.
World runs for this PR on an RTX 4080 16 GB (621.40), as announced (edited: now 10 runs). With this PR the open world came out lit in 3 of 5 runs (31 to 41 % of the frame); with
XCL_PLACE_RETIRE=0in 2 of 3 (45 and 49 %); the base in 0 of 2 (4 and 14 %). The dark runs with the PR look like the base. Same place and camera view in all runs; the lit runs show walls and a building front that are black in the dark ones.Tested
main7db2f391+ #3124 (hang at world entry) + one local input-timing patch; the runs marked PR add this PR's diff (ee8bb3d3). All shaders translated beforehand, the driver's pipeline cache warm.XCL_UMA_DRIVER=mixed:1536:1792,XCL_TEXTURE_LEVEL_PAGES=1, 600 s after the first frame, automatic input into the open world. Lit share = pixels with a channel above 16 (above 64) of 255, over the last 40 dumped frames of each run (every 15th presented frame, about the last four minutes). Runs in the order made.XCL_PLACE_RETIRE=0XCL_PLACE_RETIRE=0XCL_PLACE_RETIRE=0a superseded texture is used againlines each, the log's cap), costs no frame rate, and no run lost the device.XCL_PLACE_RETIRE=0was dark once). Yesterday'snvidia-devruns showed the same split with the switch (38 % and 16 %, numbers); the base was dark in all 8 of its runs on both trees.Not tested
main).AI use: Claude Code (Claude Fable 5.2) built the trees, made the runs and wrote this; Claude Haiku 5.5 compared the frames.
Imported from ivall/xcl. Originally posted by Aniseto on 2026-11-29T08:22:41Z.
Re-ran the superseded-target remapping tests at
ee8bb3dafter the head moved fromfe9039de; this is a new response in the same thread, not an edit of my earlier report: https://github.com/xcl-dev/xcl/pull/3192#issuecomment-7243721097System
Results
XCL_ADAPTER=NVIDIA cargo test -p xcl --lib gpu_a_superseded_render_target_the_title_binds_clears_or_moves_is_mapped_again -- --test-threads=1: 1 passed, 0 failed, 0 ignored.XCL_ADAPTER=NVIDIA cargo test -p xcl --lib gpu_a_superseded_depth_buffer_the_title_binds_or_clears_is_mapped_again -- --test-threads=1: 1 passed, 0 failed, 0 ignored.What this adds
Both device-backed tests still pass at the new head, with no SKIPPED line here: a superseded render target and depth buffer get their tiles mapped again after the title binds, clears or moves them. This adds the new head and the updated driver as dimensions; I did not run a title.
Not tested
A retail title, a paired smoke run, the full workspace suite, AMD and Intel GPUs, native wave64 hosts, Wine, release profile, game data.
AI-assisted (OpenCode), model: DeepSeek V4.1 Flash Free - ran the commands above on this machine and wrote this report; no game data was used.
Imported from ivall/xcl. Originally posted by ettehn on 2026-11-30T06:07:20Z.
I checked this head against newer main after #3179 and #3287 landed. On
d52ff48c+ee8bb3d3, the only textual conflict was the comment aboveuav_barrier_x. Keeping main’s comment left both code paths intact. The build then hit the duplicateany_supersededdefinition noted above (E0428). Keeping main’s helper fixed the build. Local integration treecfb2ad75502edae2f75e09251de767100bc31c49.Windows Release, RTX 5070 Ti Laptop system (NVIDIA 621.24), Rust 1.97.1 MSVC. Placement, barrier-group and superseded-target tests passed 25/25 with no skips. The R32_FLOAT and D16 GPU readback cases also passed 2/2 in a fresh process with
XCL_BARRIER_GROUPS=0. The remaps in those fixtures still happen with #3287’s optional texture transition conversion disabled. This run covered synthetic tests only.OpenAI Codex (GPT-6.2 Sol) assisted with source review and Windows verification.
Imported from ivall/xcl. Originally posted by thehollowedone on 2026-12-01T04:19:46Z.
CI follow-up for head
7c60a35a: the Windows job fails the unchangeda_placed_texture_gets_the_pages_of_a_level_with_its_texelsassertion. It expects 28 new 64 KiB pages but sees 4. The earlier new depth test logged three disjoint 512×512 D16 targets, 8 pages each, and finished 2.017 s before that assertion.page_bytes_forcounts the whole device, whilebind_rangesweeps idle pages before allocating after a 2 s idle interval. Removing 24 unrelated pages while adding 28 gives exactly the observed net 4. That is a strong explanation for this assertion, though the log does not identify the swept pages or explain the subsequent access violation. The same test passed on currentmainCI.The test can check its own mapped mip groups instead of a device-wide delta, then compare the two fully mapped resources' tile identities to retain the sharing check. This follows the earlier #718 correction. Candidate against this head, not run locally:
Candidate test-only diff
Separately, the description check requires a newly generated clean
xcl-smokeblock for this head; its current PR block is for2d632bd2. I did not run that smoke or a new test here.AI use: Codex (GPT-6.2 Sol) traced the CI and source; Codex (GPT-6.2 Astra) independently checked the idle-page sweep and candidate direction.
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T05:22:31Z.
Review (head
7c60a35a, diff read, not a merge-check:Build and testandPR descriptionboth fail, so not built or run here yet):title_textures::a_placed_texture_gets_the_pages_of_a_level_with_its_texelscame up short by 1,572,864 B and the test process then crashed (STATUS_ACCESS_VIOLATION). That's exactly the pages of the three 512x512 D16 targets ingpu_a_superseded_depth_buffer...(real.rs~15370; also ~15327), so their placements probably stay on the shared device and get freed afterVRAM_TEST_LOCKis released. Main's recent CI runs are green.2d632bd2, not the head7c60a35a(whyPR descriptionfails), in different scenes, and the PR's own log shows the change wasn't reached. The description still refers to headsee8bb3d3/2d632bd2.note_usethroughresource_barrier_x(list_x.rs~6474-6477). Only barriers with no state change are new here (the test's COMMON -> COMMON is one), and the groups get parsed twice. The "both addany_superseded()" note is stale; main has it since #3179.OMSetRenderTargetstakes up to three kinds of global lock (real.rs~11397-11402), and every CreateRenderTargetView / CreateDepthStencilView now takes two.placements.rs~589).Fine: no nested locks, the same queue wait as the existing
note_use, no interaction with #3416 (separate hunks), the tests fail without the change, and the GPU tests useskip_test.AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.
Imported from ivall/xcl. Originally posted by Kalmarv on 2026-12-02T19:38:07Z.
Closing: largely superseded by merged #3179 (
b0b616968); will open a small targeted PR onmainif any residual RTV/DSV remap is observed.Pull request closed