acphal: room for SHAPE contexts on top of a title's non-cached heap, so ProjectScarlett starts #557
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/557"
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?
Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-11-29T23:16:52Z.
Refs #554 (and #556, my duplicate). It's @csj0oe's area; take it or replace it. #511 edits the same files and needs a rebase.
ProjectScarlett crashes at start-up since #527: it asks for a non-cached APU heap of 0x226e00 bytes, then takes 350 XMA contexts (0x5780) and a block of 0x222e00 at alignment 0x800. The
ApuAllocis refused, 0x1800 bytes short, and the title clears the null block it got (@glovepost's disassembly on #554). Before #527 both heaps were one region.As @glovepost points out, the title leaves only 0x4000 bytes over, so it can't be counting the contexts in its size. This adds the default heap's 1 MiB on top of a title's own size. My first version rounded the size up to 64 KiB, which fails for a size that is already a multiple of it; thanks for catching that. The contexts stay in the non-cached heap, as the existing tests (from the header) say;
ApuHeapGetStatethen reports the larger heap.Tested:
python tuxbox.py check --no-gpupasses on this version (ac1cc0d3).python tuxbox.py checkofac1cc0d3: RTX 5090 (10de:2b85, 620.70.10) 200 pass, 0 fail (a game was loading on it for part); AMD iGPU (1002:13c0, RADV) 199 pass, 0 fail. GE-Proton11-14.10de:2b85, 620.70.10, GE-Proton11-14, Linux), plainmainf482572aplus it ran until my 2-minute limit, wheremain6bab5478, andf482572awith only logging added, crash at start-up. An integration build with it ran past start-up and for its full 40 minutes, still on loading screens, with no device loss. @1093i3511 ran the rounding version (with #501) on an RX 6600: through init, then 11 minutes to the world. This version (ac1cc0d3), in an integration build off482572aon the same card, ran through start-up to the story's loading, about 10 minutes, and ended there in a different crash (a refused ray scene, under investigation).Not known: where the console keeps the contexts. Not run: anything that shows audio works.
🤖 Generated with Claude Code
Imported from brcly/TuxBox. Originally posted by 1093i3511 on 2026-11-30T00:00:08Z.
Works on an RX 6600 (RDNA 2, RADV / Mesa 26.3.1, GE-Proton11-14). I tested
f482572a+ #557 (62c991d8) + #501 (cbb6a2df). The title got through init with nomemsetfault, andTuxBox xapu: software Opus connection readyis back. It then ran for 11 minutes and reached the world, where it ended on the title's watchdog (unrelated, #472). Before #557, the same base crashed at init in 2 of 2 runs.@glovepost's caveat about already aligned sizes still applies; this run only shows that the
0x226e00case works.Imported from brcly/TuxBox. Originally posted by Kayotic1337 on 2026-11-30T00:50:02Z.
Game run on an RX 9070 XT (
1002:7550, RDNA 4, RADV / Mesa 26.3.1, GE-Proton11-14, Linux 7.3.6), the same card I used to bisect #554 to #527.Build:
mainf482572a+ this PR (ac1cc0d3), with #546, #548 and #535 merged on top for a combined test. #527 is not reverted.Game Initin 2 of 2 runs. TheVCRUNTIME140.dll + 0x1989/game_scarlett_master.exe + 0x43AED60crash from #554 is gone.int_prolo, frames 1208 and 2716).mainhad before #527 (GPU TCP write fault0x741041in the warm run), so that crash isn't caused by this PR.Until this lands I'll use it in place of my local revert of #527.
Imported from brcly/TuxBox. Originally posted by brcly on 2026-11-30T04:11:47Z.
Merged into main as
70d7e137(squashed and credited to you), so I'm closing this. It fixes #554: ProjectScarlett gets through init again. I confirmed it with a boot here: the xapu Opus connection comes up and shaders compile. Thanks, and thanks to everyone on #554 for the bisecting and the disassembly.Pull request closed