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

All games have graphical corruption with Vulkan on RetroArch #1631

Open
PoloniumRain opened this issue Sep 5, 2024 · 16 comments
Open

All games have graphical corruption with Vulkan on RetroArch #1631

PoloniumRain opened this issue Sep 5, 2024 · 16 comments
Labels
bug Something isn't working graphics Rendering issues libretro Specific to Libretro core

Comments

@PoloniumRain
Copy link

Platform / OS / Hardware:

RetroArch 1.19.1 on PC, Windows 11, AMD Threadripper 3960X, RTX 3080 (latest drivers)

Description of the Issue

Graphical corruption in the form of many small flickering blocks, shown in the videos below. I've tried 12 random games so far and it affects each one. RetroArch Shaders have an effect on it, but it also always happens without shaders. So Vulkan is unusable because this problem is always visable. Depending on the game and area it will sometimes have less or more graphical corruption when a shader is either enabled or disabled. I also have the D3D11 shader problem mentioned in #1612, so GL is only thing that's working for me.

Debugging Steps Tested

  • Clean install of RetroArch with default settings.
  • Default Flycast core settings.
  • I've also tried many different core settings. None have any effect.
  • D3D11 has graphical corruption but only with shaders enabled.
  • GL works fine with or without shaders.
  • Older Nvidia drivers from 5+ months ago also have this issue
Rayman2.mp4
MDK2.mp4
Daytona.mp4
@PoloniumRain PoloniumRain added the bug Something isn't working label Sep 5, 2024
@flyinghead
Copy link
Owner

This is very likely a GPU or GPU driver issue.
Does it happen only in Per Pixel Transparent Sorting? Or also in Per Triangle and Per Strip?

@flyinghead flyinghead added the graphics Rendering issues label Sep 6, 2024
@PoloniumRain
Copy link
Author

It happens with all of those settings. I also thought it may be my GPU, because the corruption looks similar to when a GPU's VRAM has been overclocked too high. But my GPU isn't overclocked, and any other emulators, games, benchmarks or stress tests that i try will all run fine, including Vulkan stuff.

I've now tried 4 different drivers, all released within the past 7 months, and nothing makes a difference.

@flyinghead
Copy link
Owner

Can you try Flycast standalone?

@PoloniumRain
Copy link
Author

Just tried 8 games with standalone v2.3 and Vulkan works fine.

I've also now tried 20+ games with the RetroArch Flycast core and they all have the same graphical corruption, including the Dreamcast menu that appears when there's no disc in the console.

@flyinghead flyinghead added the libretro Specific to Libretro core label Sep 6, 2024
@flyinghead
Copy link
Owner

I would try to do a fresh install of retroarch, using default settings and no add-ons, shaders, ... and see if the issue persists.
Trying older RA versions could also help determine if it's a regression in 1.19.1.

@PoloniumRain
Copy link
Author

PoloniumRain commented Sep 7, 2024

I would try to do a fresh install of retroarch, using default settings and no add-ons, shaders

Already tried that.

But i've now tested older RetroArch versions, going back to 1.14. Theses all work without any issues with Vulkan. The problem was introduced in version 1.19.0, which was released on the 30th of May. So i'll make a post about this issue on the RA GitHub...

EDIT: Created a post on the RA GitHub.

@CO-Windler
Copy link

On my Ryzen 2400G APU Vulkan also has glitches (e.g. water pixel mess in "Soul Surfer"). DirectX11 works better (only Sega Driving Simulator depends on OpenGL, which seems slower/choppier on my APU).

@cdf83
Copy link

cdf83 commented Sep 17, 2024

Not sure if related but I find recently that Sega Rally 2 freezes quite often in RetroArch, particularly in the menus after the name entry screen. It doesn't seem to do this in standalone.

It was more frequent with the gl driver but also occurs with d3d11

@ToniBC
Copy link

ToniBC commented Sep 29, 2024

The corruption appears even in the Flycast 2.3.2-199 nightly and in Retroarch with the Vulkan Driver. Even in the BIOS as they say.

With DX11 it seems to be mitigated or it doesn't appear, the same if you set the native resolution, it doesn't appear in the BIOS, but if you increase the resolution, there are artifacts in the BIOS at the bottom right, above the clock icon, both in Flycast and Retroarch.

If Full Framebuffer Emulation is activated, the artifacts no longer appear, but we can't increase the resolution.

This has been happening for a while and as it happens in both, it's not focused on AR.

Many won't notice it because they use old versions, like March 2.3, but it seems to be something related to the framebuffer.

@flyinghead
Copy link
Owner

flyinghead commented Sep 29, 2024

@ToniBC if you increase the resolution you might need to increase the pixel buffer size. What you're seeing may be the result of the pixel buffer overflowing.
So far this issue only happens on the flycast core, not standalone.

@ToniBC
Copy link

ToniBC commented Sep 29, 2024

This one has 128 layers and 4GB of pixel buffer. Tested by default and the same thing happens.

I have tested the same configuration (even moving the .cfg from one version to the other) with Flycast 2.3 and it doesn't cause any problems, those errors are not observed in the bios or in the games, but the same thing happens with the latest versions.

I will try to test other previous versions to see if the same thing happens.

@ToniBC
Copy link

ToniBC commented Sep 29, 2024

I have done several tests with several versions, I'll tell you.

In version 2.3.2-4 (2024-05-21) everything apparently works fine, the glitch does not appear in the bios.

In version 2.3.2-95 (2024-05-23), the glitch already appears there. The changes introduced there, some broke something. I'll put the changes here.

  • Merge remote-tracking branch 'origin/dev'
  • android: update project
  • deps: update sdl to version 2.30.3
  • deps: update libchdr
  • deps: update imgui to version 1.90.6
  • cmake: better version conversion for uwp
  • Always use BSD sed
  • dx11: use ALLOW_TEARING flag to disable vsync if available
  • gl: only display crosshairs when needed
  • gl: refactor vmu and xhair drawing. Blit rendered frame only once
  • std::swap is undefined for vector
  • vk: multi render support
  • fix compile warning
  • naomi: fix marstv freeze
  • os_notify
  • ui: load savestate thumbnails asynchronously. limit thumbnail size
  • ios build fix
  • switch, uwp, libretro build fixes
  • save screenshot. add screenshot to savestates
  • achievements: fix size of multiple challenge indicators popup
  • ui: bug fixes. cheats window changes
  • work around mingw-w64 init crash
  • move ui to its own folder
  • achievements: leaderboard notifications. detailed toast message
  • ui: split display_settings
  • ui: use uiScaled()
  • ui: use imgui for vmu on pause menu. toast notifications
  • ui: crash when loading asian fonts on windows
  • achievements: better game load message when no achievements
  • ui: change pause menu layout. add icons here and there
  • vk: don't delete the ImGui driver when recreating the swap chain
  • achievements: hardcore mode
  • achievements: fix crash when loading image cache
  • ui: achievements list, new pause menu
  • Use Xcode 15.3
  • better RetroAchievements UI and threading
  • move http_client to oslib
  • macos: bump minimum macOS version to 10.11 to avoid build error
  • Merge remote-tracking branch 'origin/master' into dev
  • RetroAchievements support
  • ci: update netbsd and openbsd versions
  • savestate: drop support for legacy libretro and * move most os_* funcs to oslib
  • lr: switch build fix
  • drop dispmanx support. move switch main() to its own file
  • get rid of os_GetSeconds()
  • lr win32 build fix
  • vk: move macOS video routing code from context to renderer
  • minor input and lua fixes
  • set thread names
  • macOS build fix
  • thegamedb: ignore common disk ids T0000 and T0000M
  • ui: rearrange Settings > Video screen
  • android workflow: fetch submodules recursively (for libadrenotools)
  • vulkan: allow custom GPU driver loading with libadrenotools
  • maple: implement AllStatusReq for controller and VMU
  • msvc build fix
  • Fix vmu beep frequency
  • bump libchdr to match master
  • [Libretro] Check for per-pixel compatibility and hide the option if not supported
  • Merge remote-tracking branch 'origin/master' into dev
  • richer discord presence using boxart from thegamesdb
  • fix compile warnings
  • Discord Presence support
  • set currently played game name in the window title
  • android: hid barcode scanner support
  • fix FreeBSD x64 segfault context
  • isofs: fix long directory listing
  • bump depth scale for NHL 2K2
  • sh4: fix P4 region mapping and on chip ram addressing
  • deps: sync imgui_impl_vulkan.cpp with upstream
  • deps: update imgui to version 1.90.4
  • sdl: support multiple mice when allowed by the platform
  • naomi: fix shaktam inputs
  • cmake: improved parallelism in msbuild
  • ci: use cross-platform-actions/action to build on bsd systems
  • bsd: update segfault context for arm64
  • deps: update imgui to version 1.90.3
  • linux: use egl with x11 instead of glx
  • deps: update libchdr
  • deps: update libzip to version 1.10.1
  • ci: use latest devkitpro docker image
  • init drive when running .elf. Skip special settings for BIOS and .elf.
  • gladLoader: check return code and log. cheats: light refactoring
  • Merge remote-tracking branch 'origin/master' into dev
  • samsptk: use cheat instead of extra depth scale
  • gdrom: delay "no disk" reporting to let the BIOS play the boot animation
  • pvr: apply a negative bias to background plane depth
  • ui: replace Exit by Close Game. Better format for some UI values.
  • gdrom: set correct lead-out FAD of single-density area

@flyinghead
Copy link
Owner

This is a merge commit from the dev branch, which includes many changes.
Can you try to same exercise on the dev branch to narrow it down a bit?

@ToniBC
Copy link

ToniBC commented Sep 30, 2024

Unfortunately I don't have enough knowledge to compile versions, the ones I found were those, between those two I don't have more versions. The oldest buildbot is from 2024-07 which is where the bug is already in the master branch.

@flyinghead
Copy link
Owner

flyinghead commented Sep 30, 2024

I didn't look at the dates but yes, the issue seems to have appeared a while ago.

@ToniBC
Copy link

ToniBC commented Sep 30, 2024

I guess that since Retroarch's default driver is now dx11 and before that GL, it doesn't fail there, it seems to only fail in Vulkan with resolutions higher than the native one. If Full Framebuffer is activated so that certain games work well, the problem is solved, because it is set to native resolution.

Since many don't touch options, they have it in dx11 and there it seems to work well.

All this with Nvidia RTX 3070 GPU. On AMD, I have to try it on Steam Deck and ROG which is the only AMD I have to see if the same thing happens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working graphics Rendering issues libretro Specific to Libretro core
Projects
None yet
Development

No branches or pull requests

5 participants