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

Open
mahhnameisjeff wants to merge 1 commit from upstream-pr/174 into amd
mahhnameisjeff commented 2026-12-03 14:30:03 +00:00 (Migrated from github.com)

Imported from eikkapine/jaxe. Originally posted by mahhnameisjeff on 2026-12-03T14:30:03Z.


Base: origin/amd (0902398). Independent of the other PRs from this batch.

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

<!-- greyfinch-sync:eikkapine/jaxe:issue:5628486645 --> Imported from [eikkapine/jaxe](https://github.com/eikkapine/jaxe/pull/174). Originally posted by [mahhnameisjeff](https://github.com/mahhnameisjeff) on 2026-12-03T14:30:03Z. --- Base: origin/amd (0902398). Independent of the other PRs from this batch. 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)
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/174:upstream-pr/174'
git switch 'upstream-pr/174'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'amd'
git merge --no-ff 'upstream-pr/174'
git switch 'upstream-pr/174'
git rebase 'amd'
git switch 'amd'
git merge --ff-only 'upstream-pr/174'
git switch 'upstream-pr/174'
git rebase 'amd'
git switch 'amd'
git merge --no-ff 'upstream-pr/174'
git switch 'amd'
git merge --squash 'upstream-pr/174'
git switch 'amd'
git merge --ff-only 'upstream-pr/174'
git switch 'amd'
git merge 'upstream-pr/174'
git push origin 'amd'
Sign in to join this conversation.
No reviewers
No labels
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.

Reference
eikkapine/jaxe!174
No description provided.