Series S: translate AMD FidelityFX ACCC/FSPX compute programs (fixes black scene, #81) #237
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/gamingwithhomie--larp!237
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-237"
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?
@mustafaburaksanli on GitHub · 2026-12-05 21:57 UTC · original
mustafaburaksanli:fsr-accc-series-s→main· +473 −61 · 9 files · 5 commits · openFixes the black 3D scene on
--console series-s(#81). On Series S the title runs AMD FidelityFX throughamd_fidelityfx_upscaler_xbox.dll. That DLL's 29 compute containers have noDXILpart, so none of them translated ("no DXIL part") and the scene stayed black. Their native program is in anACCCpart instead. This PR reads that part and fixes the translator gaps it exposed. All 29 programs now translate and pass the DXIL validator. Before this PR, none did.In-game on Series S, the 3D scene now renders, with the title's own upscaler (default
upscaler).Result
With
LARP_HOST_MAX_WAVE=32 --validate --pipelines(what the runtime uses on this card), 29 of 29 pipelines are created.Without
LARP_HOST_MAX_WAVE=32,translatebuilds for a 64-lane host. The 4 wave64 programs then fail--pipelineson a wave32 GPU with "wants wave lane count of 64". That is the host GPU's limit, not a translation error.Regression check
LARP_EMIT_DUMP) fromshaders.rpfand this DLL, with the binary before this PR and after it. I did this twice, in the default mode and withLARP_HOST_MAX_WAVE=32.cargo test --workspacepasses.The
ACCC/FSPXlayout (as observed, all 29 containers)No root layout table is stored, so it is built from the container's
RTS0:user_dataof every 0x41 entry and the user SGPR count in RSRC2 (8 or 14).Commits
1.
91a9ff1Translate the ACCC/FSPX programs (23 of 29)native.rs:fspx_programsparses theACCCpart.container_programsreturns the programs of theDXILpart, or of theACCCpart when there is noDXILpart.translated_program,pipeline.rs,translateandshader-infouse it.used_entry).resource.rs:raw_view: FidelityFX loads a buffer descriptor, then makes it raw. It clears the stride (s_and_b32 w1, 0xc000ffff), multiplies the record count by the stride, and sets OOB_SELECT to raw (s_or_b32 (s_and_b32 w3, 0xcfffffff), 0x30000000). Withoutidxenthe stride never enters an address, so this is treated as the loaded view. This was the error "a descriptor changed after loading" in 28 programs.copy_sourcefoldss_bfm_b32with constant operands, ands_mov_b64of a literal without the sign bit. One program builds its sampler that way.lower.rs:v_dot4c_i32_i8,v_dot4_i32_i8andv_dot4_u32_u8(no clamp).v_pk_fmac_f16, the VOP2 form: each half reads the same half, and the accumulator is vdst.src_sccas an operand (0/1).2.
617955bSCC of a lane-mask operation read as wave-uniform data. Fixes @0x75830, and the first error of @0x7e680, @0x8e6e0 and @0x95020.s_and_b32 m, cmp, exec, thens_cselect_b32 s, -1, 0on that SCC, thens_orn2.scc_some(some lane has the bit, soWaveActiveAnyTrue). Only phi joins used it.scc_innow lowers it throughscc_some(), so the select and thes_orn2become plain scalars. Before, this failed with "a lane mask read as data".3.
c6cd00cLane reads after a whole-wave section, by its simulation. Fixes @0x7e680, @0x8e6e0 and @0x95020.v_readlane_b32 s, v, 63. Only the upper lanes hold the whole wave's OR, so the value has no lane-uniform shape.emit/wave.rs,simulatenow returns the per-lane values.Section::readsgives each constant-lanev_readlaneafter the restore the shape of the lane it reads. This only applies to values that have no shape of their own.emit/lower.rs, the block loop lowers those reads throughsection_read.4.
80bafe9Image atomics with a16 coordinates, image stores of some channels. Fixes @0x704f0.image_atomic_add ... a16has 16-bit coordinates, packed two to a VGPR, and 32-bit data. So it is not a 16-bit atomic.addr_valalready unpacks a16, so now only d16 data is refused.image_store dmask:0x1 d16(it clears the counter) failed next.5.
21e3d21SGPRs spilled to VGPR lanes, read back by their lane writes. Fixes @0xb2e80.v_writelane_b32.v_readlaneof that VGPR failed with "a root descriptor".spilled()inemit/lower.rs: when the VGPR has no value, a constant-lanev_readlanefollows the chain of constant-lanev_writelanes back to the scalar written to that lane.Not in this PR
Tested on
shader-replacefolder.--console series-s --stream-budget 2500, 1920x1080,frame_rate=30, around 29 fps after the shader cache warmed up.🤖 Generated with Claude Code
@ICEE93 on GitHub · 2026-12-05 22:11 UTC · original
https://github.com/rorodev6/victory-nvidia-megafork/pull/5
@mustafaburaksanli on GitHub · 2026-12-05 22:23 UTC · original
Thanks for the link, the two changes look complementary:
ACCC/FSPXlayout (root layout fromRTS0, used resources from the type 7 entries, wave size and VGPRs from the type 0 entry) and the instruction forms these programs need. With it, 23 of the 29 programs translate and validate.DeserializeComputePipelineStateXso the title reaches the console path at all, instead of falling back to NewBE.larp needs both before the title's own FSR4 can run on Series S. The 6 programs still missing here are listed in the description: 4 x "lane mask read as data", one 16-bit image atomic, one store through a root UAV descriptor. That overlaps the "three wave64 passes remain untranslated" noted there.
Until then,
upscaler = dlss(orfsr) insettings.inigets a picture on Series S, because the host upscaler replaces the console FSR.@gamingwithhomie on GitHub · 2026-12-05 22:51 UTC · original
Great format work - keeping this as draft until the last 6 FidelityFX programs translate and the Series S scene renders (as you note, its still black). The ACCC-part reader + 23/29 validator-clean translations are exactly the foundation #81 needs; shout when the remaining 6 are identified and well test-merge immediately.
Series S: translate FidelityFX ACCC/FSPX compute programs (partial, #81)to Series S: translate AMD FidelityFX ACCC/FSPX compute programs (fixes black scene, #81)dba993e561to21e3d210ca@eipastel on GitHub · 2026-12-06 03:10 UTC · original
Tested this PR (
21e3d21) on an RTX 5060 8 GB (driver 621.01), Windows 11 build 26300,--console series-s, no upscaler configured, street save, settings all default: the 3D scene is still black here.does not translateline in the log; onmainthere are 29).DeserializeComputePipelineStateX FAILED hr=0x80004001for all 29 FSR 4 passes, larp still logsmethod: not implemented object="pipeline state" slot=0x58andobject="command list" slot=0x1a8, and 20-21 dispatches per frame are still dropped without a host pipeline.main, 0.3). With #444 on the same machine the picture renders (59-100).One run, luma from a screen capture of the window every 15 s (no image kept). Logs and the table in #81.
Written with AI assistance (Claude Code).
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.