melonDS-emu / melonDS

DS emulator, sorta
https://melonds.kuribo64.net
GNU General Public License v3.0
3.14k stars 516 forks source link

Graphical Glitches after AMD Driver OpenGL overhaul #1578

Open FleetingFlame opened 1 year ago

FleetingFlame commented 1 year ago

Hello! Overall this emulator has been wonderful, but after AMD overhauled OpenGL in their drivers this year certain sections of Pokemon White are graphically glitched with black distortions flickering across the textures. The ones I have observed so far are the Title Screen and inside Pokemon Centers. I've attached screenshots of the glitches to be sure. These glitches also only happen when I am using the OpenGL option to increase resolution, though this issue persists anywhere from 16 times the resolution to 11. My GPU is an RX 6900 XT and Adrenalin 22.11.2 Optional installed for my GPU driver,

Melon Glitch 2 Melon Glitch 1

This emulator is absolutely wonderful and has recaptured a part of my childhood, thank you for making better looking and playing pokemon platforms than Nintendo.

Thank you for your time (and wonderful emulator)

TsukiZero commented 1 year ago

question: checked with version 0.9.4?

PeeJayBonobo commented 1 year ago

@TsukiZero I also use an RDNA2 GPU (RX 6800) and can confirm that this also happens with 0.9.4, and not with just the Pokémon games, but with any game with 3D models that I throw at it.

bandicam 2022-12-16 15-48-19-483

Jaklyy commented 1 year ago

Does not seem to occur for me on an RX 480 running 22.11.2 drivers w/ i5-6400. Checked on both 0.9.4 and 0.9.5. It's possible this bug only affects more recent AMD GPUs.

PeeJayBonobo commented 1 year ago

Does not seem to occur for me on an RX 480 running 22.11.2 drivers w/ i5-6400. Checked on both 0.9.4 and 0.9.5. It's possible this bug only affects more recent AMD GPUs.

I think so, too. melonDS worked perfectly fine on OpenGL at 8xIR with my BIOS-modded RX 5700 as well, so it might actually be safe to bet on it being an RDNA2 (and hopefully not the recently released RDNA3) exclusive problem.

One workaround I can do is use mesa-dist-win to open melonDS, but then I lose stability, but at least, OpenGL with MKDS and Phantasy Star 0 works perfectly. I wonder if the Mesa (Arch Linux) drivers pose any issues at all?

EDIT: Works perfectly fine with the Mesa drivers on Arch Linux.

Paegasus commented 1 year ago

Doesn't work on my RX 5600 XT either.

awsomekevin12 commented 1 year ago

Hi, I have the exact same issues with 3d textures using the opengl renderer. However, after using my iGPU the graphical errors dissapeard, even inside pokemarts and in the intro 3d scene: Capture3 Here's the post I made detailing more:

1688

RSDuck commented 1 year ago

could it be that the romhack disables edge marking?

I feel like the AMD driver doesn't like the fact that we read and write to the same framebuffer object (but different textures inside it, so it should be ok).

awsomekevin12 commented 1 year ago

could it be that the romhack disables edge marking?

I feel like the AMD driver doesn't like the fact that we read and write to the same framebuffer object (but different textures inside it, so it should be ok).

Sorry, its not actually the ROM hack that fixed things. It turns out that using my iGPU is what fixed the issue. My dedicated card in my laptop had graphical issues.