libretro / beetle-psx-libretro

Standalone port/fork of Mednafen PSX to the Libretro API.
GNU General Public License v2.0
308 stars 131 forks source link

[Beetle PSX HW][Vulkan][Nvidia Shield TV] Performance regression #473

Open kikeminchas opened 5 years ago

kikeminchas commented 5 years ago

Description

With the latest release of the Beetle PSX HW core there is a substantial performance drop in NVIDIA SHIELD TV using RetroaArch 64. Before, core was full speed up until 4x Internal Resolution using the Vulkan driver. Now, it stays locked at 40fps. Tried with Ridge Racer Type 4 and Crash Bandicoot, both stay locked at 40fps. This is independent of the Internal Resolution selected, from 1x to 4x. Deleting all options from cfg files and delete core didn't solve the issue.

Expected behavior

Full speed until 4x Resolution in most games. Certainly full speed at 1x.

Actual behavior

Core stays locked at 40 fps in the 2 games tested that were previously full speed. Using Internal Resolutions 1x to 4x.

Steps to reproduce the bug

Load any game with Vulkan driver, all options default.

Bisect Results

Since commit: da97856

Nvidia also released a new update for the Shield just before this started to happen. Suspected could have something to do with the issue but other Vulkan apps like Dolphin seem unaffected.

Version/Commit

da97856

Core options

All default. Tried several performance options like disabling SW Framebuffer or Frame Duping, whatever the options, the game stays at 40fps.

Environment information

hizzlekizzle commented 5 years ago

In researching this issue, I found that there haven't been any new beetle-psx builds since 12/10, so it's not any of the recent updates to the core that have caused it.

However, since updating my Shield, I noticed that beetle-psx-hw, dolphin-libretro and the menus detect a monitor refresh rate of 30 Hz, but only with Vulkan. GL still detects 60 Hz for both core and menus (I tested XMB and Ozone menus).

Software-rendered cores appear unaffected.

If I toggle fast-forward, both dolphin-libretro and beetle-psx-hw can exceed 60 fps. Currently, the best workaround seems to be disabling vsync in settings > video and relying on audio sync to throttle the framerate as needed.

kikeminchas commented 5 years ago

Thanks a lot for investigating this one @hizzlekizzle. For me, menus (XMB) are 60fps. I can confirm tough that deactivating VSync makes the core 60fps again in game. Deactivating Audio sync also makes it go over 60fps so it does not seem to be a performance issue but something broken in VSync?

There have been several commits indeed since 10th December but no new builds (at least not for Android 64).

hizzlekizzle commented 5 years ago

I didn't notice any tearing even with vsync disabled, so I wonder if the Shield is forcing some weird driver-based vsync of its own...

kikeminchas commented 5 years ago

OK, I tried another core with vulkan (I only use vulkan with Beetle with PSX HW core). I tried FBA with Street Fighter 3. With Vsync enabled, frame rate is set to 40 fps. Disabling Vsync makes it full speed 60fps. :( Not good... .it really looks like it is something with the driver. any idea how to report this to NVIDIA? Will post it in their community forum just to check if somebody else has seen this...

frankyfife commented 5 years ago

i have the same problem with beetle psx hw and sw. however, no deactivation of vsync and/or audio sync helps. (shield exp 7.2.1)

i have no comparison to before, because i have the shield new. the pcsx rearmed core works fine. there are no optical improvements active in all cores, i used metal gear solid (pal) for testing.

the ingame framerate seems to be locked to 24,88 fps (ogl driver), under vulkan it's even worse or less fps.

andres-asm commented 5 years ago

I can't reproduce this on my shield ATV. Clean setup it's running perfect in vulkan.

I just downloaded RA and changed:

Then I loaded RA again, menu is still 60hz Loaded MGS, loaded VR missions, 60hz

image

Increased IR to 2x, 60Hz Increased IR to 4x, 60hz Increased IR to 8x, 60hz

image

andres-asm commented 5 years ago

Updated my shield to shield 7.2.1, still fullspeed on vulkan

frankyfife commented 5 years ago

I also installed Shield Experience Verison 7.2.1.

My games and BIOS files are exactly the same that I can use on the PC without any problems. I have excluded my receiver (denon x1400h) as source of trouble, my TV as well (sony KD-55XE9305). I also connected the shield directly to the TV. the resolution, according to the shield configuration, is 3840x2160 (HDR) at 60hz.

The PCSXrearmed core works without problems in retroarch, as do other cores such as reicast. I can also use Dolphin for example (luigis mansion) and have no performance problems.

a complete reinstallation of retroarch including the relevant cores didn't improve the performance (ogl and vulkan), nor did the installation of nightly builds of ra+cores.

PAL games run @ 24-25 fps (stock beetle psx hw configuration) NTSC games run @ 40 fps (even fmv's) (stock beetle psx hw configuration)

hkzlab commented 5 years ago

Got a new shield (2017), updated to 7.2.1 . Got the same issue with both vulkan and glad, I was able to test only PAL games though.

kikeminchas commented 5 years ago

@fr500 , tried again, deleted Retroarch's data to start fresh. Downloaded core, loaded RR Type 4, no change in options and again stuck at 40 fps. Disabled VSync and got 60fps.

Since you're using Ozone, I assume you have a nightly installed? I might try that as well just in case....

EDIT: I have tried uninstalling stable and installing latest nightly. Same thing, with Vsync ON , locked at 40fps, with VSync OFF 60fps. I can confirm though that after trying Ozone, I will never go back to XMB :)

lourinaldi commented 4 years ago

Bumping this because it still appears to be an active problem, even a few Shield updates later (including the current SHIELD Software Experience Upgrade 8.2).