Skip to content

GPU: count selected compute dispatch recordings across the prologue - #3

Open
Artking175 wants to merge 9 commits into
Castyan:wave64-paired-formfrom
Artking175:wave64-dispatch-evidence
Open

Artking175 wants to merge 9 commits into
Castyan:wave64-paired-formfrom
Artking175:wave64-dispatch-evidence

Conversation

@Artking175

Copy link
Copy Markdown

Follow-up to DexNom#64 on 88f8f9a.

A diagnostics build accepts VICTORY_TRACE_DISPATCHES as a comma-separated list of full compute shader hashes. The trace counts title attempts and commands recorded on D3D12 separately for direct and indirect dispatches. It reports cumulative totals at frame 1, every 64 presents and on fatal host errors. The indirect recorded count describes commands recorded with ExecuteIndirect. Its GPU count buffer can still yield zero work.

On RTX 2060, Windows 10, driver 531.41 and Agility 1.614.1, the counter test passed. I reran the prologue with one release binary and two copies of the same initial save and cache, switching only VICTORY_WAVE_PAIRS. Both runs reached the heavy scene and then exited with 0x887a0005 (device removed).

Pairs First heavy frame Last presented frame at fatal report Seven target hashes with direct or indirect attempts / recordings
Off 1747 1750 0 / 0
On 1771 1781 0 / 0

An additional hash, 7d460e9b7accbe81, logged 18 indirect attempts and zero recordings in the paired run. The fatal snapshot captured these attempts between periodic reports. An initial control launch had timed out before reaching the heavy scene, so the table uses the two fresh runs with the fatal snapshot.

Offline on the same final build, the seven target shaders validated in both modes. Hardware PSO creation was 0/7 with pairs off and 7/7 with pairs on. The Agility loader overlay was used only on the test machine.

Castyan and others added 9 commits November 26, 2026 03:55
…f fxceless#854)

Port of 26600c6 from fxceless/victory-fork#854 by PiloteCode ("wave64
programs in a paired form on 32-lane hosts, mesh programs over 32 KiB
linked with their pixel program, and more"). Each console wave runs as
one host wave of 32 lanes, each thread two console lanes (n and n + 32),
with every per-lane branch taken by the whole wave and EXEC as each
lane's guard. It is tried after every other form for a wave64 compute
program the host refuses (VICTORY_WAVE_PAIRS=0 turns it off).

On the 31 wave64 compute containers from the RTX 5060 preload, 29 get a
pipeline (22 before): 02384a60fda6f2d0, 1d434307d981352a,
22338086ea4c5364, 2da4beb386509b77, 3b02415f67c6b0d8, 6832a9da15c2e584
and 6b82bc7d22016cb5 now take the paired form; the other 22 are
unchanged.

Adapted to this branch:
- Kept from this branch: scalar_built() and the v_readfirstlane own-lane
  read, lds_subtract() with Module::negated() (the PR's own LDS
  subtraction loop is left out), the wave-wide last resort from
  DexNom#40 (now inside emit_forms), the POPS translation from pops.rs,
  the structured view record count / picked address / puddle texture
  size paths and scalar UINT views (moved into descriptor_data.rs next
  to the PR's unused-descriptor path, which now only runs where this
  branch refused).
- Left out: the PR's second POPS implementation (ir::without_pops_wait,
  Shader::ordered and its test), which would have run beside pops.rs.
- The ray-tracing structure builder's programs (a spilled user-data
  table, as victory-gpu classifies them) are refused by the paired form:
  forcing them onto 32-lane hosts hung NVIDIA GPUs in Marvisak#2711.
  28918b7150a7aad5 and caa78b8ca62bc3d6 stay refused.
- The new modules are classified in lib.rs; a test that expected the
  parked mask to be opaque when built alone checks only the shared build;
  the descriptor size test fills the record-count root word the runtime
  fills.

Co-Authored-By: Pilote Production <75377040+PiloteCode@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The two BVH builder programs (28918b7150a7aad5, caa78b8ca62bc3d6) were
the last wave64 compute programs refused on 32-lane hosts. They exchange
across the console wave's halves, which the per-half form got wrong and
which hung NVIDIA cards (Marvisak#2711). The paired form keeps
both halves in one host wave, so the refusal is dropped: all 31 wave64
compute containers from the RTX 5060 preload now get a pipeline.

The builder still runs only when victory-gpu allows it
(VICTORY_BVH_BUILDER=1 or VICTORY_RAY_TRACING=1) and every one of its
pipelines has a host pipeline; by default its dispatches stay dropped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e method 0x218)

The title calls device method 0x218 at start for every variant of its
small compute programs (mip generation of texture arrays), handing over
a 0x60-byte description: the root signature, then (address, size) pairs
of the program's registers, its code and its resource table. Until now
the call failed with a null output and the title went without these
pipelines.

The program is now read from the description (registers, console
resource table, code without its s_code_end padding) and wrapped in a
container of its own, which is translated and cached as the title's
containers are. Descriptions that cannot be read still fail with
E_NOTIMPL and a null output. Method 0x1c8 (native graphics pipelines)
stays refused: it needs the draw's render-target formats.

The descriptor tracer also folds s_bfm_b32 and a 64-bit s_mov of a
literal (zero extended), the two instructions these programs use to
build their fixed sampler; without them the sampler's origin was lost
and the pipeline refused.

On the five 0x218 captures from the RTX 5060, all five now get a
hardware pipeline and are created by the runtime.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The 0x218 commit cut the note on device method 0x1c8 down to one line
and dropped its `shortcut:` marker, which is how the repository lists
what is not implemented. It also put native_build.rs in the middle of
the sorted list of sources outside the translation, with a comment that
did not say why it is outside. The note and its marker are back, and
the entry now sits at the end of the list with the reason: native_build
only writes containers, which are hashed like any other.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
warp_a_title_buffer_in_place_shows_its_bytes_at_its_offset decommitted
half of its allocation right after dropping the buffer placed over it.
The pages of a heap opened on private memory stay locked until the
runtime has destroyed the heap, and WARP may do that a moment after the
last reference goes: under the load of the whole victory-gpu suite the
decommit was sometimes refused (ERROR_INVALID_PARAMETER) and the test
failed, or the run ended in an access violation. About 2 runs in 15
failed this way, already on a65db62.

The test now retries the decommit for two seconds at most, drops its
command queue before releasing the allocation, and checks that the
release succeeds. 40 runs of the library in a row now pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Descriptions captured in game showed three misreadings in the decoder of
programs handed to device method 0x218:

- The user-data dword and the stride were swapped. The byte in the
  packed word is the user-data dword: every entry of root slot k names
  dword 4 + k, inside the program's COMPUTE_PGM_RSRC2 user-SGPR count.
  The u32 before it is the stride (0x10 or 0x20 for structured buffer
  SRVs, 4 for images, as in the title's own containers). With the swap,
  the CBV of every accepted mip-generation program named user-data
  dword 0 instead of the table in dword 4. A root parameter that names
  user data the program does not have is now refused.
- The header count is not always that of the 0x41 entries (11 for 12
  seen), so the entries are told apart by their tag.
- Root type 0 is root constants, read as values from the user SGPRs
  (`v_mul_f32 v7, s5, v7`). They are now a root parameter of size/4
  SGPRs, with no used resource.
- The thread-group depth is the low half of its word; the high half
  holds something else (0x10 seen with 32 x 1 x 1 groups).

In game, 0x218 now makes over 2048 pipelines and turns down 32 to 63
descriptions (before: about 512 made, over 1024 turned down). Of eight
descriptions captured in game, all now decode and four reach a hardware
pipeline; the four others stop at translator limits (a descriptor
changed after loading, an address with two computed terms). The five
earlier captures still pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A description the decoder turns down used to be logged with a count
only, and one whose blocks could not be read was not logged at all.
The warning now gives the reason (which block, or the decoder's error)
and the description's twelve words.

With VICTORY_DUMP_NATIVE=<folder>, a description turned down is saved
there with the blocks it names, four of each reason and 200 in all, as
slot218-<n>-desc-<address>.bin and slot218-<n>-dNN-<address>-<size>.bin
with the reason beside them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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