Repository navigation
Conversation
A recording is a stand-in PC list that keeps the words XCL's hooks send its ResourceBarrier (the title's legacy barriers through resource_barrier_x, its enhanced barriers through uav_barrier_x); a CPU model of the GPU runs recordings in a chosen submission order and reports each transition whose before-state is not the state the texture is in at that point, which is what the debug layer reports as 527 / 538. The debug layer itself is not used: it is one per process, and turning it on would remove the devices of the tests running beside these. The textures are WARP resources (their descriptions are read); nothing runs on the GPU. The cases here hold on main: the model itself, two lists submitted in their recording order (direct and compute), and a list submitted again that ends where it starts. The cases that do not hold (a list recorded before another but submitted after it, a list reset unsubmitted, KickoffX segments) come with the change that makes them hold. Part A of the plan on xcl-dev#3094 (7298369429). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Review (head a7c1ddd, diff read, not a merge-check; draft):
Fine: the transition word offsets (resource +8, subresource +16, before/after +20/+24) and split flags match what AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point. |
Part B of the plan on xcl-dev#3094 (7298369429): recorded, not used yet. barrier_groups and alias_copy take a texture's state from what was recorded last, but the GPU runs lists in the order they are submitted. submit_states keeps, per recording (a PC list between two resets), the state it needs each texture in when it starts and the one it leaves it in, from the words the PC list really gets; and the state each texture is in after the recordings accepted so far, in submission order (one map for all queues: a legacy state is the resource's, whichever queue moves it), advanced only by chunks the driver accepted, from ExecuteCommandLists and from KickoffX. What D3D12 returns to COMMON when the call ends (all a copy queue's list used, a buffer, a simultaneous-access texture) is COMMON there too. What a recording needs and the queue does not have are the fix-ups part C puts before it. A split barrier's begin half leaves the texture pending (neither state, rule 8) at the recording's end; as its first move it gives what the recording needs at its start (its before-state). A move of one subresource makes the texture mixed, which keeps today's behaviour. A recording is forgotten when its list starts another: Reset, a new list at its address, a KickoffX that submitted it, a mid-list split's next list, a segment back in the pool, its release. Off unless XCL_SUBMIT_STATES=1: each hook is one atomic load. The tests force the switch per thread (on and off), whatever the environment says. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
a7c1ddd to
04eb807
Compare
|
Follow-up review (head 04eb807, since a7c1ddd, diff read, not a merge-check; draft, checks red):
New:
Fine: every list lifecycle path now forgets its recording, KickoffX advances the queue, decay follows the D3D12 rules, and the default path is still one relaxed atomic load per hook. AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point. |
|
@Foniass Thanks, all five were real. Fixed in the one commit, now
The parts stacked on this (the fix-up pool and parts C2a and C2b, local drafts) are rebased onto it. In part C2a, the harness's AI use: an agent swarm: Claude Opus 5.5, Claude Sonnet 5.5, GPT-6.2-Sol, Gemini 4 Neon and Gemini 4 Hydrogen. |
Stacked on #3559; only the top commit (
D3D12.X: keep each recording's barrier states for submission order) belongs here.Part B of the plan on #3094 (7298369429).
barrier_groupsandalias_copytake the state a texture is in from what was recorded last, but the GPU runs lists in the order they are submitted. This part records, without using it yet: per recording (a PC list between two resets), the state it needs each texture in when it starts (first) and the one it leaves it in (now), from the words the PC list really gets; and the state each texture is in after the recordings accepted so far, in submission order (one map for all queues: a legacy state is the resource's, whichever queue moves it), advanced only by chunks the driver accepted, fromExecuteCommandListsand from KickoffX. What D3D12 returns to COMMON when the call ends (all a copy queue's list used, a buffer, a simultaneous-access texture) is COMMON there too. What a recording needs and the queue does not have is what part C's fix-up lists put before it.XCL_SUBMIT_STATES=1; with it off each hook is one atomic load.Related: #3094 (7297382882), #3489, #3558
What is in it (one commit)
crates/xcl/src/hle/d3d12x/submit_states.rs(new):Recording(per-texturefirst/now/ mixed / pending),Queued(the queue's states;applyper accepted list,fixupsfor part C), the hooks, and 10 unit tests (the hooks with the switch forced on and off per thread, whatever the environment says).crates/xcl/src/hle/d3d12x/list_x.rs:resource_barrier_xreports the words it sends; KickoffX's submissions advance the queue's states; the recording is forgotten on Reset, list creation, KickoffX, a mid-list split, a segment back in the pool and release (one line each).crates/xcl/src/hle/d3d12x/real.rs:q_execute_command_listsadvances the queue's states after each accepted chunk, on its queue (one line).crates/xcl/src/hle/d3d12x/mod.rs:mod submit_states;.Tested
After the review fixes (head
04eb8071), RTX 5090, driver 621.40, Ryzen 7 9800X3D, Windows 11 Pro build 26200.9974, Rust 1.99.1, debug:cargo test -p xcl --lib -- hle::d3d12x --test-threads=4without and withXCL_SUBMIT_STATES=1in the environment: 1217 passed, 0 failed, 3 ignored both times.cargo test -p xcl --lib -- hle::d3d12x hle::d3d12x::list_x hle::d3d12x::real hle::d3d12x::submit_states --test-threads=4(the modules the commit touches), head04eb8071: 1213 passed, 4 failed, 3 ignored; the 4 are thetitle_texturestests below, which fail onmainon this machine too.cargo test --workspace --no-fail-fast -- --test-threads=4, head04eb8071: 2897 passed, 5 failed, 51 ignored.maind0832e61(the commit Tests: a harness for barrier states across submission orders #3559 is on) on the same machine: 2882 passed, 5 failed, 51 ignored. The same 5 fail on both:title_textures::tests::placed_title_textures_share_vram_and_preserve_pixels, the threetitle_textures::tests::stream_recheck_*tests, andtest_title_runs_and_game_folder_is_untouched.no wave64, 2no heap windows, 3no D3D12 debug layer,pso_measurement_compiles_an_exact_synthetic_record(Developer Mode off). Left out by the run on this VM (no GPU_UPLOAD heaps): 3uma_drivertests.Regression run
These blocks are of
a7c1ddd3, before the review fixes; a pair on04eb8071follows.main-full-d8bd), the same frozen accepted-terms profile (r18-terms:gamesaveandpls/settings), and held Enter.XCL_SUBMIT_STATESwas unset in the head arm. The script-made blocks below are verbatim.Main
9dfbe3ea:Part B
a7c1ddd3:Not tested
XCL_SUBMIT_STATES=1on a title: nothing reads the records yet (part C).AI use
🤖 Generated with Claude Code