[Corrected: they fall back to the normal path] Device methods 0x1c8 and 0x218 are called ~18,000 times: description layouts #113

Open
opened 2026-11-26 03:36:21 +00:00 by github-bot · 3 comments
Owner

@⁠dkdknight on GitHub · 2026-11-24 21:34 UTC · original

Device methods 0x1c8 and 0x218 (unknown_pipeline in device.rs) are not 29 calls: by the time the world is loaded they have been called at least 16,384 and 2,048 times, each time for a different pipeline. The title goes without every one of them.

How it shows

  • unknown_pipeline logs only calls 1–4 and powers of two, so a run shows about 29 warnings for both methods together. That reads like 29 pipelines (I wrote "29" myself in #31). The calls field in those lines is the real count. In one run (RTX 5080, 1684989, Series X profile, into the world) it reached slot=0x1c8 calls=16384 and slot=0x218 calls=2048.
  • They are not retries of the same pipeline. A local diagnostic saved the description at each logged call. Every one names a different program: different GPU address, size and bytes.
  • The title gets E_NOTIMPL and silently draws or dispatches nothing with these pipelines. So they are not in the frame line's "dropped without a host pipeline", which only counts pipelines that exist but have no host pipeline.

What the descriptions hold (from those calls; offsets in bytes, sizes and layout only)

  • 0x218, compute: 0x60 bytes
    • +0x00: the root signature (one of ours).
    • +0x08/+0x10: a 0x1c-byte block, shared by many pipelines. It holds, among other words, 0x00080008, 0x00000001, which looks like the group size.
    • +0x18/+0x20: a 0x14-byte block.
    • +0x28/+0x30: the program's code, in title GPU memory (256-byte aligned), and its size (0x180 to 0x1f9c0 seen).
    • +0x38/+0x40: a metadata block (0x118 to 0x1798 bytes seen).
    • +0x48, +0x50: two pointers.
    • +0x58: a 64-bit hash.
  • 0x1c8, graphics: 0x160 bytes
    • +0x00: the root signature.
    • Two blocks (0x17c–0x200 and 0x50–0xbc bytes).
    • Then slots of four words: code, code size, metadata, metadata size. Most calls use two slots; one uses a 0x4a40-byte program with another slot.
    • +0x118: 0x0401000000000160; 0x160 is the description's own size.
  • The metadata blocks
    • They start with 0x403, then a size.
    • Then come 32-byte records tagged 0x41, 0x42 and 0x43. The 0x41 records look like user-data / root-parameter mappings.
    • The 0x43 record ends with four words that also appear in the first 24 bytes of the program's code.

Possibly related: #13. In the Series S profile, the title's own debug output names DeserializeComputePipelineStateX failing with 0x80004001. That may be one of these two methods; I have not confirmed it.

Why it matters: these are pipelines the title asks for and never gets, thousands of them. It is a likely cause of missing geometry and materials in the world. I have not tied particular missing objects to them.

Plan (I am taking this on): these programs come as code plus metadata, without a shader container. Implementing the two methods means building the translator's native program (what the FSSM record of a container gives today) from the metadata block and the two small blocks. First step: find programs delivered this way that also exist in a container of the shader pack, and read the metadata fields against the FSSM record. Shout if someone is already on it.

Nothing from the game's files is attached: counts, offsets and sizes only.

AI use: Claude Code, Claude Opus 5.5 ran the builds and the run on the machine above (the person at the machine played), wrote the local diagnostic that saved the descriptions (not committed), read them and wrote this issue.

**@⁠dkdknight** on GitHub · 2026-11-24 21:34 UTC · [original](https://github.com/fxceless/victory-fork/issues/113) **Device methods 0x1c8 and 0x218 (`unknown_pipeline` in `device.rs`) are not 29 calls: by the time the world is loaded they have been called at least 16,384 and 2,048 times, each time for a different pipeline. The title goes without every one of them.** **How it shows** - `unknown_pipeline` logs only calls 1–4 and powers of two, so a run shows about 29 warnings for both methods together. That reads like 29 pipelines (I wrote "29" myself in #31). The `calls` field in those lines is the real count. In one run (RTX 5080, `1684989`, Series X profile, into the world) it reached `slot=0x1c8 calls=16384` and `slot=0x218 calls=2048`. - They are not retries of the same pipeline. A local diagnostic saved the description at each logged call. Every one names a different program: different GPU address, size and bytes. - The title gets `E_NOTIMPL` and silently draws or dispatches nothing with these pipelines. So they are **not** in the frame line's "dropped without a host pipeline", which only counts pipelines that exist but have no host pipeline. **What the descriptions hold** (from those calls; offsets in bytes, sizes and layout only) - **0x218, compute: 0x60 bytes** - `+0x00`: the root signature (one of ours). - `+0x08`/`+0x10`: a 0x1c-byte block, shared by many pipelines. It holds, among other words, `0x00080008, 0x00000001`, which looks like the group size. - `+0x18`/`+0x20`: a 0x14-byte block. - `+0x28`/`+0x30`: the program's code, in title GPU memory (256-byte aligned), and its size (0x180 to 0x1f9c0 seen). - `+0x38`/`+0x40`: a metadata block (0x118 to 0x1798 bytes seen). - `+0x48`, `+0x50`: two pointers. - `+0x58`: a 64-bit hash. - **0x1c8, graphics: 0x160 bytes** - `+0x00`: the root signature. - Two blocks (0x17c–0x200 and 0x50–0xbc bytes). - Then slots of four words: code, code size, metadata, metadata size. Most calls use two slots; one uses a 0x4a40-byte program with another slot. - `+0x118`: `0x0401000000000160`; 0x160 is the description's own size. - **The metadata blocks** - They start with `0x403`, then a size. - Then come 32-byte records tagged `0x41`, `0x42` and `0x43`. The `0x41` records look like user-data / root-parameter mappings. - The `0x43` record ends with four words that also appear in the first 24 bytes of the program's code. **Possibly related:** #13. In the Series S profile, the title's own debug output names `DeserializeComputePipelineStateX` failing with `0x80004001`. That may be one of these two methods; I have not confirmed it. **Why it matters:** these are pipelines the title asks for and never gets, thousands of them. It is a likely cause of missing geometry and materials in the world. I have not tied particular missing objects to them. **Plan (I am taking this on):** these programs come as code plus metadata, without a shader container. Implementing the two methods means building the translator's native program (what the FSSM record of a container gives today) from the metadata block and the two small blocks. First step: find programs delivered this way that also exist in a container of the shader pack, and read the metadata fields against the FSSM record. Shout if someone is already on it. Nothing from the game's files is attached: counts, offsets and sizes only. **AI use:** Claude Code, Claude Opus 5.5 ran the builds and the run on the machine above (the person at the machine played), wrote the local diagnostic that saved the descriptions (not committed), read them and wrote this issue.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:36:21 +00:00
Author
Owner

@⁠dkdknight on GitHub · 2026-11-24 21:45 UTC · original

Correction: these pipelines are not missing; my "the title goes without all of them" was wrong.

Corgansm/victory-corgi read the title's code around these methods (the comment on unknown_pipeline in its device.rs). I checked the 0x218 side in the title's binary, and it holds:

  • 0x218. Its only caller is at title+0x247fe25. When the call returns no pipeline, the code goes straight on (title+0x247fe66) to make the same pipeline through CreateComputePipelineStateX (device method 0x1f0), from its own description. That path works today.
  • 0x1c8. Per victory-corgi's reading, it builds pipelines ahead of use on a worker thread and keeps them in a table. One that fails is left out, and the usual methods make it when it is drawn. I did not re-check this side.

So the counts in the first post (16,384 and 2,048 calls) are cache and pre-build attempts that fall back to the normal path. They are not undrawn objects. Implementing the two methods would save the fallback creations; it would not add to the picture. victory-corgi already answers 0x218 from the container the fallback made (cached_compute in its device.rs).

The description layouts in the first post still hold. The conclusion "likely cause of missing geometry and materials" does not. I am leaving this issue open only as a record of the layouts, and I am not working on it any more.

AI use: Claude Code, Claude Opus 5.5 disassembled the call site in the title's binary to check this.

**@⁠dkdknight** on GitHub · 2026-11-24 21:45 UTC · [original](https://github.com/fxceless/victory-fork/issues/113#issuecomment-7145343993) **Correction: these pipelines are not missing; my "the title goes without all of them" was wrong.** [Corgansm/victory-corgi](https://github.com/Corgansm/victory-corgi) read the title's code around these methods (the comment on `unknown_pipeline` in its `device.rs`). I checked the 0x218 side in the title's binary, and it holds: - **0x218.** Its only caller is at title+0x247fe25. When the call returns no pipeline, the code goes straight on (title+0x247fe66) to make the same pipeline through `CreateComputePipelineStateX` (device method 0x1f0), from its own description. That path works today. - **0x1c8.** Per victory-corgi's reading, it builds pipelines ahead of use on a worker thread and keeps them in a table. One that fails is left out, and the usual methods make it when it is drawn. I did not re-check this side. So the counts in the first post (16,384 and 2,048 calls) are cache and pre-build attempts that fall back to the normal path. They are not undrawn objects. Implementing the two methods would save the fallback creations; it would not add to the picture. victory-corgi already answers 0x218 from the container the fallback made (`cached_compute` in its `device.rs`). The description layouts in the first post still hold. The conclusion "likely cause of missing geometry and materials" does not. I am leaving this issue open only as a record of the layouts, and I am not working on it any more. **AI use:** Claude Code, Claude Opus 5.5 disassembled the call site in the title's binary to check this.
Author
Owner

@⁠Revens2 on GitHub · 2026-11-24 21:58 UTC · original

Analysis of whether a change is justified, from the code on main (4e17478) and the correction above:

  • unknown_pipeline::<0x1c8> / <0x218> in crates/victory-gpu/src/device.rs return E_NOTIMPL with a null out, as documented on the function. Per the correction in this issue, the title falls back to CreateComputePipelineStateX (0x218 path, checked in the binary) or to the usual draw-time creation (0x1c8 path, not verified). The fallback pipelines are the ones that get drawn.
  • Cost of the ~18,000 calls: each is an atomic add and a null store; the description is only read for calls 1-4 and powers of two, so about 29 reads and warnings for 18,000 calls. I did not measure it in game; nothing there looks heavy, but this is not verified by a profile.
  • Implementing the two methods would mean building the translator's native program from the metadata block. Per this issue's author it would only save the fallback creations and add nothing to the picture. That is a large change with no measured gain and a real risk (the current E_NOTIMPL path is the one the title is known to handle).
  • The only cheap change would be lowering the warning level. I am not proposing it: it changes no behaviour and the first-4/power-of-two limit already keeps the log small.

Conclusion: no code change or PR from me. Leaving the issue open as a record of the layouts, as its author intended. Anyone implementing the methods should first measure that the fallback creation costs frame or load time; no such measurement is in this issue.

AI use: Claude Code, Claude Sonnet 5.5 read the code and wrote this comment. Nothing was run in game for this analysis.

**@⁠Revens2** on GitHub · 2026-11-24 21:58 UTC · [original](https://github.com/fxceless/victory-fork/issues/113#issuecomment-7145641511) Analysis of whether a change is justified, from the code on `main` (`4e17478`) and the correction above: - `unknown_pipeline::<0x1c8>` / `<0x218>` in `crates/victory-gpu/src/device.rs` return `E_NOTIMPL` with a null `out`, as documented on the function. Per the correction in this issue, the title falls back to `CreateComputePipelineStateX` (0x218 path, checked in the binary) or to the usual draw-time creation (0x1c8 path, `not verified`). The fallback pipelines are the ones that get drawn. - Cost of the ~18,000 calls: each is an atomic add and a null store; the description is only read for calls 1-4 and powers of two, so about 29 reads and warnings for 18,000 calls. I did not measure it in game; nothing there looks heavy, but this is `not verified` by a profile. - Implementing the two methods would mean building the translator's native program from the metadata block. Per this issue's author it would only save the fallback creations and add nothing to the picture. That is a large change with no measured gain and a real risk (the current `E_NOTIMPL` path is the one the title is known to handle). - The only cheap change would be lowering the warning level. I am not proposing it: it changes no behaviour and the first-4/power-of-two limit already keeps the log small. **Conclusion:** no code change or PR from me. Leaving the issue open as a record of the layouts, as its author intended. Anyone implementing the methods should first measure that the fallback creation costs frame or load time; no such measurement is in this issue. **AI use:** Claude Code, Claude Sonnet 5.5 read the code and wrote this comment. Nothing was run in game for this analysis.
Author
Owner

@⁠tippythetaidum on GitHub · 2026-11-24 23:14 UTC · original

Measurements that back the correction above, and the 0x218 layout in full, from one run of 4e17478 into the first scene (RTX 5080, counts only, no game data):

The fallback, counted. I logged every 0x218 call and every compute pipeline made from a container, each with the root signature it was created with. For all 26 root signatures that see 0x218, the two counts are equal, signature by signature (125/125, 84/84, 67/67, … 2,689 = 2,689 in total). The other 53 compute creations use signatures 0x218 never sees. So each failed 0x218 is followed by a creation through the normal path, as read from the binary above.

What 0x218 carries is not the container's program. Only 46 of the 2,689 code blocks passed to 0x218 start like the code of any container compute program created in the run (first 64 bytes equal; those 46 also agree with the container's record in thread-group size, COMPUTE_PGM_RSRC2 and the used-resource list). The other 2,643 match none. It reads as an already linked pipeline, not the container's program.

Implementing it would lose pipelines today. I wrote the method to try it (parts → native program → container → the existing path). All 2,689 programs read, but only 228 translate (1,712 fail with a descriptor changed after loading, 480 with a descriptor neither loaded nor built), against 2,720 of 2,734 for the containers the fallback uses. Since a successful 0x218 makes the title skip the fallback, that would be a regression. I am not opening a PR.

0x218 description (the first 0x48 bytes of the record; the rest is the title's own table):

+0x00 root signature
+0x08 header: pointer, size (28)
+0x18 hash block: pointer, size (20)
+0x28 native code: pointer, size
+0x38 table: pointer, size

header +0x00 u32 0x4005cf00, u32 0x6c090102 (same in all 2,689), u32 0
       +0x0c u16 x3 thread-group size
       +0x12 u16 flags: bit 4 wave32 (else wave64)
       +0x14 u32 COMPUTE_PGM_RSRC1, +0x18 u32 COMPUTE_PGM_RSRC2
table  +0x00 u32 0x403, u32 size - 0x14, u32 code dwords
       +0x18 32-byte blocks: u32 tag, 20 B, u32 -1, u32 0
             0x41 used resource (laid out as an FSSM used-resource entry)
             0x42 a place in the code and a shader register
             0x43 end; a 16-byte hash follows

Root layout rule (useful beyond this issue): where a program's root parameters arrive follows from the root signature alone. Parameters take user-data dwords in signature order (table 1, root descriptor 2, constants one each), then one each for the resource and sampler heaps the flags index directly; from dword 8 for vertex, pixel and mesh programs, and for compute from 4 if they fit COMPUTE_PGM_RSRC2's user SGPRs, else 16 (the spilled table). It predicts the FSSM layout's parameter placement for all 19,105 programs created in that run, and translating the 2,734 compute programs with the predicted layout gives byte-identical DXIL (2,720) or the same error (14).

AI use: Claude Code (Claude Opus 5.5 for the measurements, Claude Fable 5.2 for the test implementation and this comment), run on my machine.

**@⁠tippythetaidum** on GitHub · 2026-11-24 23:14 UTC · [original](https://github.com/fxceless/victory-fork/issues/113#issuecomment-7147182003) Measurements that back the correction above, and the 0x218 layout in full, from one run of `4e17478` into the first scene (RTX 5080, counts only, no game data): **The fallback, counted.** I logged every 0x218 call and every compute pipeline made from a container, each with the root signature it was created with. For all 26 root signatures that see 0x218, the two counts are equal, signature by signature (125/125, 84/84, 67/67, … 2,689 = 2,689 in total). The other 53 compute creations use signatures 0x218 never sees. So each failed 0x218 is followed by a creation through the normal path, as read from the binary above. **What 0x218 carries is not the container's program.** Only 46 of the 2,689 code blocks passed to 0x218 start like the code of any container compute program created in the run (first 64 bytes equal; those 46 also agree with the container's record in thread-group size, `COMPUTE_PGM_RSRC2` and the used-resource list). The other 2,643 match none. It reads as an already linked pipeline, not the container's program. **Implementing it would lose pipelines today.** I wrote the method to try it (parts → native program → container → the existing path). All 2,689 programs read, but only 228 translate (1,712 fail with `a descriptor changed after loading`, 480 with `a descriptor neither loaded nor built`), against 2,720 of 2,734 for the containers the fallback uses. Since a successful 0x218 makes the title skip the fallback, that would be a regression. I am not opening a PR. **0x218 description** (the first 0x48 bytes of the record; the rest is the title's own table): ```text +0x00 root signature +0x08 header: pointer, size (28) +0x18 hash block: pointer, size (20) +0x28 native code: pointer, size +0x38 table: pointer, size header +0x00 u32 0x4005cf00, u32 0x6c090102 (same in all 2,689), u32 0 +0x0c u16 x3 thread-group size +0x12 u16 flags: bit 4 wave32 (else wave64) +0x14 u32 COMPUTE_PGM_RSRC1, +0x18 u32 COMPUTE_PGM_RSRC2 table +0x00 u32 0x403, u32 size - 0x14, u32 code dwords +0x18 32-byte blocks: u32 tag, 20 B, u32 -1, u32 0 0x41 used resource (laid out as an FSSM used-resource entry) 0x42 a place in the code and a shader register 0x43 end; a 16-byte hash follows ``` **Root layout rule** (useful beyond this issue): where a program's root parameters arrive follows from the root signature alone. Parameters take user-data dwords in signature order (table 1, root descriptor 2, constants one each), then one each for the resource and sampler heaps the flags index directly; from dword 8 for vertex, pixel and mesh programs, and for compute from 4 if they fit `COMPUTE_PGM_RSRC2`'s user SGPRs, else 16 (the spilled table). It predicts the FSSM layout's parameter placement for all 19,105 programs created in that run, and translating the 2,734 compute programs with the predicted layout gives byte-identical DXIL (2,720) or the same error (14). AI use: Claude Code (Claude Opus 5.5 for the measurements, Claude Fable 5.2 for the test implementation and this comment), run on my machine.
This discussion has been locked. Commenting is limited to contributors.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/fxceless--victory-fork#113
No description provided.