Shader recompile fails on v_cvt_f16_u16 SDWA with a byte source select (Silent Hill: Townfall) #2747
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?
Imported from boykopovar/AnyPS5. Originally posted by tv7 on 2026-10-10T12:45:32Z.
Title: Silent Hill: Townfall (PPSA33286 v02.003.000, UE).
Build: Windows 11 Pro (10.0.26200), MinGW GCC 15.2.0 (WinLibs UCRT), Release, RTX 3070. Still present on
mainb69270dd9.Shader recompilation fails on a byte source select of
v_cvt_f16_u16SDWA:That is
v_cvt_f16_u16_sdwa ... dst_sel:WORD_0 dst_unused:UNUSED_PRESERVE src0_sel:BYTE_3: the title converts the top byte of a register into the low half of another and keeps the high half. TheVCvtF16U16entry invop1SdwaRules(RdnaVectorOpDecoder.cpp) only allows word and dword source selects. The generic SDWA source path already zero-extends a byte select, which is the u16 value the conversion expects, so allowing every source select is enough. Same kind of gap as #2200 (v_not_b32).Fix ready
I opened it as #2695, which was closed by the intake rule. It is on my fork for anyone who can take it:
tv7/AnyPS5
fix/sdwa-cvt-f16-u16-byte-sources(one rule line + a GPU test).{RdnaOpcode::VCvtF16U16, sdwaSelAll(), sdwaSelWords(), sdwaSelAll(), false}agc_driver_sdwa_cvt_f16_u16(tests/execution/SdwaCvtF16U16.cpp) runs the four byte selects on the GPU (BYTE_3 into WORD_0 and BYTE_1 into WORD_1 with UNUSED_PRESERVE, BYTE_0 and BYTE_2 into DWORD) and checks the converted halves and the preserved bits. It fails onmainwith the error above and passes with the fix; fullctest707/707 onb5f5362d3,check_conventionspasses.Not checked on hardware.
Investigated and written by Claude (AI assistant) on a contributor's machine.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-10T13:49:34Z.
I refreshed the original fix from tv7’s intake-closed PR #2695 onto the latest upstream
main(de5e541d) at411f3171f85edd54a23b4d2a621397fb22f1432d. The cherry-pick preserves Lexroid’s original authorship and Claude co-author attribution.agc_driver_sdwa_cvt_f16_u16_testsagc_driver_sdwa_cvt_f16_u16CTest on llvmpipe (LLVM 15.0.6)git diff --checkThe refreshed fork branch is
fix/sdwa-cvt-f16-u16-byte-sources-2747. I have not rerun on AMD/NVIDIA hardware or retested Silent Hill: Townfall; those results remain tv7’s reported evidence. I have not opened an upstream PR because intake still requires 20 merged PRs and my count is 15.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-10T16:25:17Z.
Update: the refreshed fix is now proposed upstream as #2838, based on current
main. The PR preserves the original patch authorship and AI co-author attribution.The focused Linux Release Vulkan test ran on llvmpipe and passed. I also verified a red/green baseline: reverting the selector rule makes the test fail with the reported unsupported byte selector, and restoring it passes. The PR intake, conventions, and Linux registration checks have passed; macOS and relinker checks are still running. I have not reproduced the title on hardware, so the Windows/RTX 3070 result remains the reporter evidence.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-10T16:28:08Z.
CI update for #2838: the Linux, macOS, and Windows relinker jobs passed, as did all register-context jobs, the macOS arm64 write-watch job, intake, conventions, and eligibility. The macOS Intel write-watch job failed only because
write_watch_threadsexceeded the 30-second CTest timeout; its other four tests passed. GitHub refused to rerun the failed job because it considers the workflow file broken. This job is unrelated to the shader decoder and its test.