Skip to content

Frame clock: each frame its own origin, ancillary handles outlive the… - #129

Merged
ivall merged 1 commit into
xcl-dev:mainfrom
gbuyssens:pr/frame-clock
Nov 23, 2026
Merged

ivall merged 1 commit into
xcl-dev:mainfrom
gbuyssens:pr/frame-clock

Conversation

@gbuyssens

Copy link
Copy Markdown
Contributor

… clock tick (#103)

  • GetFrameStatisticsX named the latest origin for every token (with 2–3 frames in flight: a newer frame's). The clock queues the origins it releases and each WaitFrameEventX takes the one it consumed, so a token's statistics carry its own frame's origin.
  • The ancillary handles of a frame event were closed under the clock's lock while the clock thread signalled them outside it (a closed, possibly recycled handle): they are shared with the thread now and close with their last holder.
  • Test: schedules / unschedules while the clock fires, and the origins of three frames in flight (the two frame-clock tests are serialized: one clock per process).

… clock tick (xcl-dev#103)

- GetFrameStatisticsX named the latest origin for every token (with 2–3 frames in flight: a
  newer frame's). The clock queues the origins it releases and each WaitFrameEventX takes the
  one it consumed, so a token's statistics carry its own frame's origin.
- The ancillary handles of a frame event were closed under the clock's lock while the clock
  thread signalled them outside it (a closed, possibly recycled handle): they are shared with
  the thread now and close with their last holder.
- Test: schedules / unschedules while the clock fires, and the origins of three frames in
  flight (the two frame-clock tests are serialized: one clock per process).
@ivall

ivall commented Nov 23, 2026

Copy link
Copy Markdown
Collaborator

Merged. Checked on Windows 11 with an RX 9070 (RDNA4), merged together with the rest of #110–#129: cargo test --workspace green with the retail samples (shader pack, console DLLs, texture archive), lib tests also with XCL_SPLIT_WAVE64=1; the retail pack still translates 26 698 / 26 698; the FSR4 GPU probe passes; Unicorn Overlord and XDefiant run. Thanks!

raylitebull added a commit to raylitebull/xcl that referenced this pull request Nov 25, 2026
raylitebull added a commit that referenced this pull request Nov 25, 2026
Recompiler & D3D12.X: mask 9-bit EXP PRIM vertex indices and map newer DispatchMesh to slot #129
ivall added a commit that referenced this pull request Nov 25, 2026
Every other method of the newer command list sits two slots after the older one, so #129 is the
older #127, not #126. A retail title's own calls through its list agree with the slots before it:
#126 takes a value and a pointer (RSSetShadingRate), #127 one resource (RSSetShadingRateImage), #128
one pointer. Nothing handles either slot yet; #2092's DispatchMesh is at #127.
JR-Wiederkehr pushed a commit to JR-Wiederkehr/xcl that referenced this pull request Nov 25, 2026
…ecuteIndirect)

Supersedes xcl-dev#724; its commits are kept with their authors.

Conflicts:
- bind.rs State keeps the tree's heap_bound and xcl-dev#1803's heaps next to
  the record buffers and scratch; reset clears the heaps and holds the
  record buffers for the old allocator; forget takes the state out of
  the sharded map (bind::STATES) and holds its buffers. HashMap is
  imported again for the PR's maps.
- console_list.rs Layout keeps xcl-dev#1803's heaps and the PR's inline_ms;
  with_heaps and user_data_ms both stay.
- device_x.rs keeps xcl-dev#1887's log of a refused signature and the PR's
  companion Dispatch signature; the CreateCommandSignature doc is back
  above its function (the merge had put it above indirect_arg_bytes).
- real.rs console slots keep the tree's #131 / xcl-dev#132 FlushCacheRange and
  the PR's DispatchMesh at xcl-dev#127.
- list_x.rs: the PR's bound_heaps test helper removes the list from
  its own part of the sharded recording map.

DispatchMesh slot: xcl-dev#1984 mapped the newer layout's xcl-dev#129 to the older
xcl-dev#126, this PR to xcl-dev#127, where it hooks DispatchMesh. Kept xcl-dev#127: it is
the shift of two slots the other methods have, and xcl-dev#1984's own reading
of the newer layout (xcl-dev#126 / xcl-dev#127 the shading-rate methods, the older
xcl-dev#124 / xcl-dev#125) puts its xcl-dev#128 at the older xcl-dev#126. xcl-dev#1984's test is rewritten
for (129, 127) and checks that the older slot runs bind::dispatch_mesh.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants