-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Persona 5 (Vulkan): native fp16 has graphical glitches on Vega (RADV and AMDVLK) #6150
Comments
There is already a config option for this in the yml file. You don't need to edit code. |
Not sure, I haven't booted Windows in a while, but I can test it. |
Bug doesn't appear on Windows, with AMD drivers 19.2.3 and 19.6.3. Interestingly, applying the mod from here: https://amicitia.github.io/mods/p5 works around the problem as well (maybe removing some effect that uses fp16). |
The engine uses FP16 heavily, the only thing that can cause that issue is incorrect handling of extended values e.g clamp(NaN, x, y) which should return NaN. This must be something with the codegen, so its likely another LLVM bug. The patch removes some post-processing effects that can generate NaN values which the game does handle properly by itself but if the codegen incorrectly handles NaNs and INFs then we have to just disable that path entirely. |
I submitted a RADV bug report here: https://bugs.freedesktop.org/show_bug.cgi?id=111039 |
Workaround, use the experimental ACO shader compiler (make sure it's a recent compile as a bug was fixed that prevented the game from launching). I can't say if it introduces other bugs, but it does workaround this particular problem. |
Workaround included in #6164 |
It would be nice to keep it enabled with ACO at least (the driver string includes "ACO"), although I guess you don't want to keep too many driver overrides in the codebase. |
ACO doesn't support native half floats yet, so it won't make a difference for now. If it works on windows, then it likely works on AMDGPU-PRO as well, however the device string reported is exactly the same as amdvlk, so sadly we can't filter between these drivers by device string. I used this PKGBUILD to install AMDGPU-PRO on my system: https://github.com/Tk-Glitch/PKGBUILDS/tree/master/amdgpu-pro-vulkan-only |
Ah okay, that makes sense. So it's only working with ACO because it doesn't support the feature yet, and is falling back to the non-native form. EDIT: @Whatcookie I can confirm that AMDGPU-PRO works, and yeah, shame about the device strings being the same. I assume disabling it at the code level means it can't be overridden from the config file? I suppose I can just keep a local branch, although I might stick with RADV anyway since it seems to work fine without native float16 (and I get to keep Freesync enabled). I also added a renderdoc trace to the RADV report, although I'm not sure it will help since I can't reproduce the bug when renderdoc is enabled. |
Description
With a Vega 56 on Linux, native fp16 support exhibits graphical glitches (glitches and inaccurate colours).
Screenshot with latest RPCS3 git (using Mesa RADV git, although the symptoms are the same with AMDVLK):
Screenshot when disabling native fp16 with Vulkan (shader_types_support.allow_float16 = false) (or reverting to a build before PR #5860):
Here's an RSX capture although I couldn't figure how to replay it, so I'm not sure if it's valid.
Bug does not affect an RX 550 (so looks to be Vega specific) and also doesn't affect the OGL renderer for either card.
System information
Gentoo Linux AMD64
RX Vega 56
Mesa RADV Git (LLVM 9)
RPCS3 git - 43f919c
The text was updated successfully, but these errors were encountered: