Skip to content
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

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

Open
PoloniumRain opened this issue Sep 7, 2024 · 17 comments
Open

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

PoloniumRain opened this issue Sep 7, 2024 · 17 comments

Comments

@PoloniumRain
Copy link

PoloniumRain commented Sep 7, 2024

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:

  • I can't test the latest RA nightly (7th August) because it crashes immediately after running any game with Flycast + Vulkan.
  • The graphics corruption happens with several Nvidia driver versions, going back ~7 months (haven't tried any older than this).
  • The standalone Flycast emulator works completely fine with Vulkan.
  • Default settings were used for RA and the Flycast core.
  • I don't have anything running in the background that could be causing this.
  • It's not just games, corruption also happens on the Dreamcast menu that appears when a disc isn't inserted in the console.
  • The type of graphical corruption looks similar to when VRAM on a graphics card has been overclocked too high. So i must stress that my card isn't overclocked and i've done many stress tests to make sure it's not a GPU related problem.

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

  • Windows 11 version 23H2
  • RTX 3080 with several different Nvidia drivers
  • 4K desktop resolution @ 120Hz refresh
Rayman2.mp4
MDK2.mp4
Daytona.mp4
@LibretroAdmin
Copy link
Contributor

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
Copy link
Collaborator

sonninnos commented Sep 7, 2024

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

@PoloniumRain
Copy link
Author

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
Copy link
Contributor

LibretroAdmin commented Sep 7, 2024

@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
Copy link
Author

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
Copy link

Boomerps2 commented Sep 9, 2024

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
Copy link
Author

@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
Copy link
Contributor

I can't reproduce it here unfortunately.

@Boomerps2
Copy link

Boomerps2 commented Sep 9, 2024 via email

@LibretroAdmin
Copy link
Contributor

@flyinghead can't seem to reproduce it either.

@gouchi
Copy link
Member

gouchi commented Sep 10, 2024

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

@PoloniumRain
Copy link
Author

@gouchi log.zip

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

@gouchi
Copy link
Member

gouchi commented Sep 10, 2024

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

@crashGG
Copy link

crashGG commented Sep 12, 2024

Maybe you can try this pr based build
#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
flyinghead/flycast@10b13df

@PoloniumRain
Copy link
Author

PoloniumRain commented Sep 12, 2024

@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
Copy link

crashGG commented Sep 12, 2024

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

@PoloniumRain
Copy link
Author

Still has the same problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants