AMD RX 9070 XT: OoT's networks fall back to software matrices (no 16x8x16 cooperative matrix), ~56 ms GPU per frame #52
Labels
No labels
accessibility
autorelease: pending
autorelease: tagged
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
question
testing wanted
wontfix
No milestone
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Hookshot#52
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Hardware: Ryzen 7 7800X3D, Radeon RX 9070 XT 16 GB (AMD proprietary driver, Adrenalin 32.0.32015.12012, Vulkan 1.4), 16 GB RAM, Windows 11
Build: HookshotBuilder from the
importantrelease (bundled source matchesfc80ed7apart fromhost/hos_thread.c), game0400486024DEC000v131072, builde0f3ccfaWhat happens
On RDNA 4 the cooperative-matrix probe rejects the device, so both networks run through the shuffle expansion:
That is most of the GPU frame on this card:
RX_VK_TAAU_KEYS=fd029a317a9a4b94)So with the TAAU stand-in gameplay is a locked 60 here, but the picture is the stretched pre-network image. The movie upscaler has no stand-in, and
HOS_NO_MOVIES=1is not an option for OoT: the title screen waits onDm_Title_0005.webmand stays black without it.Why the probe fails
RADV and AMD's driver expose
VK_KHR_cooperative_matrixon RDNA 3/4 with 16x16x16 f16 shapes (WMMA, wave32), not 16x8x16, and the per-lane element layout differs from PTXmma.m16n8k16, so both conditions invk_coopmat.cppfail.A possible path
HMMA.16816 could still use the 16x16x16 multiply if the fragments go through workgroup shared memory instead of being mapped lane to lane:
OpCooperativeMatrixLoadKHRthe 16x16 A, B and C tiles row-major from shared memory;OpCooperativeMatrixMulAddKHR(16x16x16);OpCooperativeMatrixStoreKHRthe result to shared memory and each lane reads back its 16x8 D fragment in the console's layout.It needs no knowledge of the device's lane layout, only 16x16x16 f16 support and a subgroup-sized scratch area per warp. It wastes half the multiply, but that is still a single hardware instruction against the current expansion. I can test builds on this card if that helps.
Related but not AMD-specific, so not repeated here: missing foliage (#35, #46) and the overexposure (#36, #30) look the same on this card as in those reports.
Thanks for the quick fix! Tested
black-screen-fix(b306c4d) on the real card (RX 9070 XT, AMD proprietary driver, Windows 11), rebuilt over the same folder and .nup.Movies after the first one, and the title screen, are black (audio plays)
With the default settings the first movie of the opening plays fine, now at full speed. From the next one on, where the Great Deku Tree speaks and sends Navi to find Link, the picture goes fully black (only the FPS counter, 60 fps, audio keeps playing), and the title screen background is black too. The networks are left out as intended:
With
RX_VK_NETWORK_KEEP=all(same build, nothing else changed) the movie and the title screen render correctly again, at ~17 fps as before. So the black comes from leaving the networks out: the source the upscale stub blits from apparently holds nothing on this path.For reference, with all networks kept the chain logs as:
Since the first movie works and the later ones do not, my guess is that after the first movie the 1920x1080 RGBA8 frame texture ends up flagged as GPU-written, so
texture_touchstops re-uploading the frames the decoder writes from the CPU (theRX_VK_CPU_OVER_GPUcase), and the stub keeps blitting a stale or empty image. With every network kept,e409733csamples the frame each time and it stays in sync. Syncing the frame before the blit, or upscaling straight from the decoded frame, would probably be enough.Title menu text still missing (#40, #44)
On the title screen (with
RX_VK_NETWORK_KEEP=all, so the background is visible) the strip under the logo shows its ornaments but none of the option text.Other notes
Happy to test the next build.
Screenshots for the comment above (RX 9070 XT,
b306c4d):1. Opening movie with the default settings: black, only the FPS counter (audio plays).
2. Title screen with
RX_VK_NETWORK_KEEP=all: the background renders again (17 fps), but the menu strip under the logo has no option text (#40, #44).3. Kokiri Forest in Hookshot: bare trees and grass (#35, #46) and the overexposure (#36).
4. Same area in Lichii on this card, for reference.
Same on RDNA 3 under RADV (RX 7900 XTX, Mesa 26.2.6):
vk: matrix multiplies in software (the cooperative matrices lack 16x8x16 f16)and the gameplay networknot translated: a network left out on this card, so the picture is the1080p pre-network image stretched to the output, without the network's anti-aliasing. RADV exposes
VK_KHR_cooperative_matrixon thiscard too (RDNA 3 has the 16x16x16 f16 WMMA shape you describe), so the shared-memory route proposed above should cover
it as well. Happy to test builds on it.
🤖 Written with Claude Code
Tracked in #1006, follow there. That issue collects every report of AMD-specific rendering problems, and this one is linked from it with its GPU, version and log details. If it still happens on v2.0.6 (https://github.com/NotRexed/Hookshot/releases/tag/v2.0.6; Update next to Play in the launcher), please add a comment there with your
hookshot_log.txt.