hrydgard / ppsspp

A PSP emulator for Android, Windows, Mac and Linux, written in C++. Want to contribute? Join us on Discord at https://discord.gg/5NJB6dD or just send pull requests / issues. For discussion use the forums at forums.ppsspp.org.
https://www.ppsspp.org
Other
10.8k stars 2.12k forks source link

Freedreno Turnip Mesa Drivers #15666

Open brujo5 opened 1 year ago

brujo5 commented 1 year ago

What should happen

Screenshot_2022-07-09-11-21-25-318_org ppsspp ppsspp Screenshot_2022-07-09-11-11-21-353_org ppsspp ppsspp Screenshot_2022-07-09-11-12-07-756_org ppsspp ppsspp Screenshot_2022-07-09-11-17-10-104_org ppsspp ppsspp Screenshot_2022-07-09-11-17-50-837_org ppsspp ppsspp Screenshot_2022-07-09-11-18-02-854_org ppsspp ppsspp Screenshot_2022-07-09-11-18-12-554_org ppsspp ppsspp Screenshot_2022-07-09-11-18-19-389_org ppsspp ppsspp Screenshot_2022-07-09-11-21-06-257_org ppsspp ppsspp Screenshot_2022-07-09-11-21-12-555_org ppsspp ppsspp Screenshot_2022-07-09-11-21-20-736_org ppsspp ppsspp

Who would this benefit

I just wanted to inform you that the freedreno driver works well and if it is possible that PPSSPP can benefit from it by having a more current vulkan, with more extensions and comparable to PC.

Vulkan 1.2.219 Driver version 22.1.99 poco x3 pro Adreno 640 Miui 12.5.7 Freedreno driver compiled by me.

Platform (if relevant)

Android

Games this would be useful in

All

Other emulators or software with a similar feature

Aethersx2 (ps2 emulator) masive speed up with this driver. For example using stock drivers sly racoon games is barely playable at 1x res with frame drops and slowdowns but if I use freedreno driver the game can be played at 3x and full speed all time.

The driver could be used by the adreno tools implementation as well as in the skyline emulator for normal user (non root ) or via magisk module (rooted phone)

Checklist

hrydgard commented 1 year ago

Thanks for reporting this!

One thing I can see is that we should probably check for Turnip in the driver name, and turn off that COLORWRITEMASK_BROKEN_WITH_DEPTH_TEST check.

And yeah, it's worth looking into if we can use Adrenotools like AetherSX2.

hrydgard commented 1 year ago

Oh by the way, one more note, looks like it exposes VK_ARM_rasterization_order_attachment_access. That's really great because it means full programmable blending support, with some work. Can reduce the amount of framebuffer copies we do in some cases.

ghost commented 1 year ago

For AetherSX2 , The driver only really helps with with games that use something called colclip which is used for clamping colors on the GS. Dunno if something similar could happen with any PSP title lol. On other games the driver could mess up the graphics/performance for them.

brujo5 commented 1 year ago

i just tried adreno drivers v502, v530, v604, 611, v614, v615, v631 and freedreno win for sly racoon games and heavy game like shadow of colousus. Also freedreno fixes graphic bug in egg ns and skyline (switch emu) with some games.

These drivers are intended as an alternative option for those phones with broken Vulkan drivers.

This has nothing to do here but stock drivers are bad too, aethersx2 crashes with vulkan v615 onwards. Tested on poco x3 pro a640 and mi 10T a650 with GPU OC 940mhz.

ghost commented 1 year ago

And yeah, it's worth looking into if we can use Adrenotools like AetherSX2.

You couldn't put it on the Google Play store then. Maybe other storefronts? dunno

hrydgard commented 1 year ago

Can always have special APK builds on a builtbot, as a workaround. Though of course not ideal.

brujo5 commented 1 year ago

Adreno tools in skyline Screenshot_2022-07-14-15-19-39-449_skyline emu

ghost commented 1 year ago

Quick question: Why fillModeNonSolid is not enable in my vulkan extension on my adreno 506 gpu? IMG_20221003_130353

But in adreno 630 it's already enable and what is the function of this vulkan extension? IMG_20221003_130534

unknownbrackets commented 1 year ago

I think a recent build stopped enabling that. We never use it anyway. Are you sure those are the same PPSSPP build?

It's used to show wireframe versions of graphics, i.e. a triangle that is just three lines and not filled in inside.

-[Unknown]

ghost commented 1 year ago

I think a recent build stopped enabling that. We never use it anyway. Are you sure those are the same PPSSPP build?

Ok thanks for answering, Yes I tried ppsspp v1.13.2 it's enabled but the recent build disable it 😅

Leopard1907 commented 1 year ago

Newly released Yuzu Android build also uses adrenotools to use Turnip or newer prop Qualcomm drivers.

https://yuzu-emu.org/entry/yuzu-android/

yuzu on Android ships with the ability to run custom GPU drivers, such as newer official Adreno drivers, or Turnip using libadrenotools to improve the performance on older generation Snapdragon SoCs.

ripcord95 commented 1 year ago

i just tried adreno drivers v502, v530, v604, 611, v614, v615, v631 and freedreno win for sly racoon games and heavy game like shadow of colousus. Also freedreno fixes graphic bug in egg ns and skyline (switch emu) with some games.

These drivers are intended as an alternative option for those phones with broken Vulkan drivers.

This has nothing to do here but stock drivers are bad too, aethersx2 crashes with vulkan v615 onwards. Tested on poco x3 pro a640 and mi 10T a650 with GPU OC 940mhz.

can you pls share the freedreno driver you compiled pls, preferably as a magisk module. poco x3 pro.

marosis commented 9 months ago

@ripcord95 on this github repository are already precompiled turnip drivers for magisk. Just go into releases section: https://github.com/ilhan-athn7/freedreno_turnip-CI

Narugakuruga commented 7 months ago

Test show 40% improvement in GPU bottleneck scene (10x resolution vulkan) with Snapdragon 870, compare Mesa Turnip with official driver.

When render in the same framerate, the current meter shows slightly lower ampere (it's a very rough test tho)

I believe this will benefit many old device that struggle with SSAA in 3D games