GPU: wire DeserializeComputePipelineStateX to assemble ACCC #2396
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!2396
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2396"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@makmatvey on GitHub · 2026-11-25 12:41 UTC · original
makmatvey:cursor/gpu-deserialize-compute-x-8766→main· +168 −3 · 3 files · 2 commits · openWhat's wrong
Device slot 67 (
0x218,DeserializeComputePipelineStateX) is empty onmain. The FidelityFX upscaler (amd_fidelityfx_upscaler_xbox.dll) calls it with precompiled FSPX sections; without a handler it falls through tocreate_compute_xand ends up with a pipeline that has no usable native code, so those dispatches are dropped.ACCCcontainers already translate onmain(translate_with/with_resourcestake theACCCpart when there is noDXIL). The remaining gap is assembling the deserialize call's sections into such a container.What the change does
deserialize_compute_x.ACCCcontainer (same layoutfspx_programalready reads) and hand out a compute pipeline, so translation follows the existing ACCC path.victory_shader::dxbc::buildavailable outside tests for that assembly.native_programs, and reject a null description.Deliberately does not refuse FSPX in
translate()— that would undo working ACCC translation (see maintainer note on #1468).Related: #1468, #887.
Tests
On this Linux agent:
cargo xtask policy— okcargo test -p victory-shader --locked --lib— 144 passedvictory-gpulib tests / Windows cross-compile — not run here (host_resourceiscfg(windows); noml64for the Windows target)Expect upstream
windows-latestCI to exercise the newdeserialize_compute_x_*tests.Asset policy
No game data used.
@Marvisak on GitHub · 2026-11-25 15:03 UTC · original
Automated triage for the maintainers.
Needs work: evidence and wording. Wires device slot 67 (0x218) in
crates/victory-gpu/src/device.rsto a newpipeline::deserialize_compute_x. That function reads aDeserializeComputeHead(a root signature, then pointer/size pairs for FSPX sections 0, 1, 6 and 7), repacks them as an FSPX blob in anACCCcontainer, and hands out a compute pipeline. The repacking matches whatnative.rsreads, and the round-trip test shows that. What is missing:mainnames these slots by our own function names and offsets, not by the console runtime's method names. Please dropDeserializeComputePipelineStateXfrom the doc comments and the log message (repo rule: no identifiers from the console SDK's headers) and describe it in your own words.create_compute_x". Please check what an emptyFUNCTIONSentry does inmain, so the stated symptom is accurate.CI:
checkpassing.Generated by Claude Code
@HAL9000RELOADED on GitHub · 2026-11-25 22:51 UTC · original
Data for the triage points, from the title on Windows 10: Radeon RX 7900 XTX (RDNA3), Adrenalin 32.0.32015.7029,
main13f91ca+ this PRb5c0f6d, plus the Agility exports locally (Windows 10 needs them for SM 6.6).1. The argument layout, from captured calls. I saved the first 24 descriptions the title hands to slot 0x218. There is one call site, return address
+0x24800dbin the title's image. Each description is 12 qwords: the root signature (one of our objects), then (pointer, size) for the four sections with sizes 0x1c, 0x14, the code's and the records', then two pointers and a 64-bit value. Section 0 holds the thread-group size at 0x0c-0x11 (8, 8, 1 in most). That is the orderDeserializeComputeHeadreads. The code section is the program as stored inshaders.rpfwith one 12-byte instruction inserted after its first six dwords, plus 64 bytes of s_code_end.3. On
mainwithout the PR the slot is the generic stub:method not implemented object="device" slot=0x218 caller="+0x24800db", logged once, thenE_NOTIMPL. It does not reach create_compute_x.With the PR, all 2,689 calls of a run assemble, and 8 minutes into the world nothing crashed. But 1,475 of them fail to translate with "an FSPX resource of an unknown root type". Those are CBVs as root constants (record byte 5 = 0). The records give no dword count. In all 1,469 distinct programs the constants are the last parameter, and
COMPUTE_PGM_RSRC2.USER_SGPRleaves them 1-6 dwords. Taking them up to the next parameter or to USER_SGPR cleared those refusals in a second run: 394 → 0 at translation, and translated compute programs went from 157 to 178. Most of the rest then stop at "a descriptor changed after loading" (282), a translator limit outside this PR.It is commit
4ecaa7aon top ofb5c0f6d, with a unit test, on HAL9000RELOADED/victory-fork branchfix/fspx-root-constants(github.com/HAL9000RELOADED/victory-fork@4ecaa7a0cc). Take it if you want it.@Xvania7 on GitHub · 2026-11-25 13:00 UTC · original · approved these changes
Verification on native Windows 10 x64, NVIDIA GeForce RTX 5060, Rust 1.98.1.
Checked out
b5c0f6dinto an isolated tree to cover the Windows host build andvictory-gpuunit tests not runnable on Linux:cargo test -p victory-gpu deserialize_compute_x:pipeline::tests::deserialize_compute_x_rejects_a_null_description ... okpipeline::tests::deserialize_compute_x_assembles_an_accc_compute_pipeline ... okcargo clippy -p victory-gpu -- -D warnings: 0 warnings, clean.cargo run -p xtask -- policy: clean (asset policy: 182 files ok).Wired slot 67 cleanly hands out the assembled
ACCCcontainer and pipeline translation without regressingtranslate(). LGTM.@catminou4 on GitHub · 2026-11-25 13:19 UTC · original · reviewed
Wire DeserializeComputePipelineStateX to assembly (+166). Static review only: victory-gpu/victory-hle are Windows-only (D3D12/windows-sys); not compiled or tested on this macOS arm64 host. rustc 1.98.1.
@arogan178 on GitHub · 2026-11-26 09:29 UTC · original
In-game test on Series X 1.0.2.1: this fixes slot 67, but the pipelines it hands out do not translate, so the world loses most of its draws.
Setup: RX 9070 XT, Mesa RADV, Proton Experimental (vkd3d-proton
71cae0), cross-built diag builds. Tested on63bcca4plus #1722 and #3096, and on avatarmanz/VIctory-7900XTX0ce46d5with the slot-67 line resolved todeserialize_compute_x.slot=0x218"not implemented" warningsmalformed shader: an FSPX resource of an unknown root type(native.rsresource parsing)Without a handler, the title goes without these pipelines and takes a path that renders. With the handler, it uses them, every dispatch through them is dropped, and what reads their output is missing. On the 7900XTX fork the result is a black picture while the frame counter keeps running. There, about 2,600 draws and 900 indirect executions per frame were dropped.
So the slot is not used only by the FidelityFX upscaler, as the description assumes. The title creates hundreds of its own compute pipelines through it. The assembled
ACCCprobably lays out at least one resource's root type differently from whatfspx_programexpects. I have not traced which section kind carries it.I'd suggest not merging until the assembled containers translate. Gating the handler to the upscaler's callers would also work. I can rerun any revision of this on the same setup.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.