DeserializeComputePipelineStateX (device slot 0x218): make the pipeline from its shader's container #177

Closed
github-bot wants to merge 0 commits from github-bot/gh-177 into main AGit
Owner

@⁠mahhnameisjeff on GitHub · 2026-12-03 14:30 UTC · original
mahhnameisjeff:main-deserialize-compute-pipelines → main · +267 −3 · 3 files · 2 commits · closed without merging

Base: origin/main (d284ef9). Independent of the other PRs from this batch.
The measurements below are from the amd branch (RX 6700 XT); not yet measured on main or on NVIDIA.

Device slots 0x1c8 and 0x218 (counted after the 7 object methods) are
DeserializeGraphicsPipelineStateX and DeserializeComputePipelineStateX. The title hands back pipelines compiled
ahead of time: root signature, packet and metadata, and per shader its GPU
code and metadata. Both failed (E_NOTIMPL). When they fail, the title
appears to make the same pipelines the ordinary way instead (see the note
on the graphics half below), so this is not a fix for missing draws: it
makes the compute pipelines the title asks for directly, without that
fallback.

Each shader's metadata ends with a tag 0x43 and a 16-byte hash, 0x1c bytes
from its end: the digest in the HASH part of the shader's container. Of 68
dumped shaders 64 were found among the containers the title had passed
(the other 4 it never created otherwise). So:

  • pipeline/deserialize.rs indexes every container the title passes by its
    HASH digest, and known-shaders.bin (JAXE_PIPELINE_BOOK) as a fallback;
  • slot 0x218 finds the CS's container and makes the pipeline as
    CreateComputePipelineStateX does (the packet and metadata are not read);
    a shader no container has still fails, logged;
  • JAXE_DESERIALIZE_DUMP=<folder> writes the first 24 requests of the
    still-unimplemented graphics slot 0x1c8, part by part, to learn it.

Measured: 2,048+ compute pipelines made in a run, 0 missed, no crash,
frame rate unchanged, no visible change.

The graphics half (0x1c8) is left failing on purpose. A local attempt made
it from the shaders' containers plus the graphics state the pipeline book
recorded for an ordinary pipeline of the same shaders (22 of 24 dumped
requests had one); the run fell to 690 draws a frame (about 5,600 before),
with 816 dropped for want of a host pipeline and 3,649 more. Handed a
pipeline, the title no longer makes its own; failing, it does. The real
state is only in the packet, in the console driver's own form.

Related, but not a fix for: #137, #82 (they name these slots; with them failing the title
seems to fall back to ordinary pipeline creation).

🤖 Generated with Claude Code

**@⁠mahhnameisjeff** on GitHub · 2026-12-03 14:30 UTC · [original](https://github.com/eikkapine/jaxe/pull/177) `mahhnameisjeff:main-deserialize-compute-pipelines` → `main` · +267 −3 · 3 files · 2 commits · closed without merging Base: origin/main (d284ef9). Independent of the other PRs from this batch. The measurements below are from the amd branch (RX 6700 XT); not yet measured on main or on NVIDIA. Device slots 0x1c8 and 0x218 (counted after the 7 object methods) are DeserializeGraphicsPipelineStateX and DeserializeComputePipelineStateX. The title hands back pipelines compiled ahead of time: root signature, packet and metadata, and per shader its GPU code and metadata. Both failed (E_NOTIMPL). When they fail, the title appears to make the same pipelines the ordinary way instead (see the note on the graphics half below), so this is not a fix for missing draws: it makes the compute pipelines the title asks for directly, without that fallback. Each shader's metadata ends with a tag 0x43 and a 16-byte hash, 0x1c bytes from its end: the digest in the HASH part of the shader's container. Of 68 dumped shaders 64 were found among the containers the title had passed (the other 4 it never created otherwise). So: - pipeline/deserialize.rs indexes every container the title passes by its HASH digest, and `known-shaders.bin` (JAXE_PIPELINE_BOOK) as a fallback; - slot 0x218 finds the CS's container and makes the pipeline as CreateComputePipelineStateX does (the packet and metadata are not read); a shader no container has still fails, logged; - `JAXE_DESERIALIZE_DUMP=<folder>` writes the first 24 requests of the still-unimplemented graphics slot 0x1c8, part by part, to learn it. Measured: 2,048+ compute pipelines made in a run, 0 missed, no crash, frame rate unchanged, no visible change. The graphics half (0x1c8) is left failing on purpose. A local attempt made it from the shaders' containers plus the graphics state the pipeline book recorded for an ordinary pipeline of the same shaders (22 of 24 dumped requests had one); the run fell to 690 draws a frame (about 5,600 before), with 816 dropped for want of a host pipeline and 3,649 more. Handed a pipeline, the title no longer makes its own; failing, it does. The real state is only in the packet, in the console driver's own form. Related, but not a fix for: #137, #82 (they name these slots; with them failing the title seems to fall back to ordinary pipeline creation). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Base: origin/main (d284ef9). Independent of the other PRs from this batch.
The measurements below are from the amd branch (RX 6700 XT); not yet measured on main or on NVIDIA.

Device slots 0x1c8 and 0x218 (counted after the 7 object methods) are
DeserializeGraphicsPipelineStateX and DeserializeComputePipelineStateX. The title hands back pipelines compiled
ahead of time: root signature, packet and metadata, and per shader its GPU
code and metadata. Both failed (E_NOTIMPL); the title goes without those
pipelines (#137: near trees, interior props, NPC faces not drawn).

Each shader's metadata ends with a tag 0x43 and a 16-byte hash, 0x1c bytes
from its end: the digest in the HASH part of the shader's container. Of 68
dumped shaders 64 were found among the containers the title had passed
(the other 4 it never created otherwise). So:

- pipeline/deserialize.rs indexes every container the title passes by its
  HASH digest, and `known-shaders.bin` (JAXE_PIPELINE_BOOK) as a fallback;
- slot 0x218 finds the CS's container and makes the pipeline as
  CreateComputePipelineStateX does (the packet and metadata are not read);
  a shader no container has still fails, logged;
- `JAXE_DESERIALIZE_DUMP=<folder>` writes the first 24 requests of the
  still-unimplemented graphics slot 0x1c8, part by part, to learn it.

Measured: 2,048+ compute pipelines made in a run, 0 missed, no crash,
frame rate unchanged. The graphics half (0x1c8) still fails: it needs the
blend/depth/target state, which only the packet carries (VIctory-xmem
builds variants from the bound targets at draw time instead).

Related: #137 (compute half), #82.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-03 14:36:08 +00:00
github-bot closed this pull request 2026-12-04 12:28:00 +00:00

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.