libretro / RetroArch

Cross-platform, sophisticated frontend for the libretro API. Licensed GPLv3.
http://www.libretro.com
GNU General Public License v3.0
10.14k stars 1.82k forks source link

Vulkan has been broken with the Flycast core since version 1.19.0 #16973

Open PoloniumRain opened 3 weeks ago

PoloniumRain commented 3 weeks ago

Description

When using Vulkan with the Flycast core, there is significant graphical corruption in all Dreamcast games in the form of many small flickering blocks, as shown in the videos below. At first i thought this was a Flycast problem so i posted about it on the Flycast GitHub. But after much more testing i've now narrowed this issue down to a change that was introduce with RA version 1.19.0, and it still persists in version 1.19.1. All older versions like 1.17 do not have this problem, at least going back to 1.14, which is the oldest that i've tested.

Some things of note:

Steps to reproduce the bug

  1. Set the video driver in RetroArch to Vulkan
  2. Go to Online Updater > Core Downloader and get the latest Flycast core
  3. Run any DC game and you should now see the same issue as shown in the videos below.

Version/Commit

RetroArch stable 1.19.0 and 1.19.1 are both affected.

Environment information

https://github.com/user-attachments/assets/6939e144-5cd7-45d6-a77d-e3ee96b9e287

https://github.com/user-attachments/assets/866d1c79-c77f-41af-b80d-cd1bd714d51c

https://github.com/user-attachments/assets/da6b4ccd-6d17-43ca-9350-3cbbb2485e17

LibretroAdmin commented 3 weeks ago

These seem to be the only major changes made to the Vulkan code in 1.19.0 -

VIDEO/VULKAN: Add support for A2R10G10B10 HDR format VIDEO/VULKAN: Implement HDR readback - screenshot support

Do you have HDR support enabled in RetroArch? Can you try disabling it in RetroArch and then seeing what happens?

sonninnos commented 3 weeks ago

No such issues here with fresh versions, and also no HDR. Windows 10, GTX 970 + 536.23.

PoloniumRain commented 3 weeks ago

I do have an HDR display but i don't have HDR enabled in both Windows and RetroArch. All the RA versions i've tested with have used default settings, so HDR was disabled (i just doubled checked to make sure).

LibretroAdmin commented 3 weeks ago

@sonninnos List your Nvidia driver version and OS.

@PoloniumRain Same as well. Also maybe post your retroarch.cfg file. Maybe you have some setting/feature enabled which is causing this.

PoloniumRain commented 3 weeks ago

Windows 11 version 23H2, OS build 22631.3447 Nvidia 560.94 drivers.

But as mentioned, i've also tried several older Nvidia drivers. I don't remember what versions, but they were all released within the past 7-ish months.

Here's the config files for 1.19.0 (corruption) and also the config for 1.17 (working fine), which are both clean installs so they should be using default settings: config.zip

Boomerps2 commented 3 weeks ago

Yep same issue here. I found per-pixel helps but doesn't solve the issue. Crazy Taxi is almost unplayable because it fills the screen. Funny thing is Naomi 2 works fine as well as Dreamcast. It's a Vulkin issue. Switching to Open GL fixes the problem.

PoloniumRain commented 3 weeks ago

@Boomerps2 What OS and GPU drivers are you using? For me everything has it - DC, Naomi and Naomi 2. The cores Per-pixel option can reduce the problem in a game area or menu screen, but then in another area or menu it can make it worse. Enabling/disabling RA shaders also has the same effect... Weird.

LibretroAdmin commented 3 weeks ago

I can't reproduce it here unfortunately.

Boomerps2 commented 3 weeks ago

Window 11 with latest Nvidia drivers with the latest Retroarch 1.19

Yahoo Mail: Search, Organize, Conquer

On Mon, Sep 9, 2024 at 10:10 AM, @.***> wrote:

@Boomerps2 What OS and GPU drivers are you using? For me everything has it - DC, Naomi and Naomi 2. The cores Per-pixel option can reduce the problem in a game area or menu screen, but then in another area or menu it can make it worse. Enabling/disabling RA shaders also has the same effect... Weird.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

LibretroAdmin commented 3 weeks ago

@flyinghead can't seem to reproduce it either.

gouchi commented 3 weeks ago

@PoloniumRain May you provide some log also ? Thank you.

PoloniumRain commented 3 weeks ago

@gouchi log.zip

Btw the latest nightly is no longer crashing with Vulkan, but it still has this problem.

gouchi commented 3 weeks ago

I can't reproduce the issue with latest, and also no HDR. Windows 10, GTX 1060 and Nvidia driver version 560.94.

crashGG commented 2 weeks ago

Maybe you can try this pr based build https://github.com/libretro/RetroArch/pull/16984

Maybe it's because the RA vulkan head version is too old, and Flycast updated the vulkan version sdk to 1.3.261 last year https://github.com/flyinghead/flycast/commit/10b13dfe9c9b4dcbb421c210704603c9c2a100c8

PoloniumRain commented 2 weeks ago

@crashGG Sadly that didn't help.

I tried copying the working 1.17 retroarch.exe into a 1.19.0 folder, so that it's using retroarch.cfg from 1.19.0 and all the other associated files, and the 1.17 .exe still works fine without any problems. Then i did the same with a nightly build, and the 1.17 .exe also works there.

Is it possible to download nightly builds between 1.17 - 1.19.0? I can't find any that old on https://buildbot.libretro.com/nightly

But then i could narrow down this problem to an exact date.

crashGG commented 2 weeks ago

RA_vulkan13.zip try this build ,copy it to nighty RA build folder

PoloniumRain commented 2 weeks ago

Still has the same problem.

faxesystem commented 1 week ago

Can reproduce this.

Fresh Win 11 23H2 Build 22631.4169 RTX 3070 with 32.0.15.6109 Ryzen5 1600AF RA 1.19.1 Flycast Core 915532f Connected to LG OLED CX 65" 4k@120Hz GSYNC

BUT when activating shaders the issue is gone!

Screenshot 2024-09-21 025341 Screenshot 2024-09-21 025731

gouchi commented 1 week ago

@PoloniumRain @faxesystem So this issue only happens in Windows 11 with Nvidia ? If it is the case, the issue title should be renamed with this information. Thank you.