libretro / RetroArch

Cross-platform, sophisticated frontend for the libretro API. Licensed GPLv3.
http://www.libretro.com
GNU General Public License v3.0
9.76k stars 1.77k forks source link

(Video) Vulkan and Linux with RADV #7068

Open Pickapart opened 5 years ago

Pickapart commented 5 years ago

Hi, I have a Radeon R9 270x (Curaçao XT) so a GCN1.0 architecture. I have activated amdgpu free driver instead of radeonsi to have a chance to use Vulkan. Vulkan works like a charm on games which support it, like Talos Principle (just incredible, no bugs, no glitches). But on RetroArch Beetle PSX for example has full of bugs and glitches, even if the game is correctly launched. My question is : is Vulkan run correctly on GCN1.1+ so it cannot run well on GCN1.0 ? Is there any plan to have better support of Vulkan especially RADV driver in RetroArch ? Here a paste of log using Vulkan :

[INFO] RetroArch 1.7.3 (Git b2ceb50)
[INFO] === Build =======================================
Capacités: MMX MMXEXT SSE1 SSE2 SSE3 SSSE3 SSE4 SSE4.2 AVX AES 
Built: Jun  4 2018
[INFO] Version: 1.7.3
[INFO] Git: b2ceb50
[INFO] =================================================
[INFO] Environ SET_PIXEL_FORMAT: RGB565.
[INFO] Version de l'API libretro: 1
[INFO] Compilé depuis l'API: 1
[INFO] [Audio]: Set audio input rate to: 29970.03 Hz.
[INFO] [Video]: Video @ fullscreen
[INFO] [Wayland]: Physical width: 600 mm x 340 mm.
[INFO] [Wayland]: Video mode: 1920 x 1080 @ 60.0000 Hz.
[INFO] [Wayland]: Setting buffer scale factor to 1.
[INFO] [Wayland]: Seat name: seat0.
[INFO] Vulkan dynamic library loaded.
[INFO] [Vulkan]: Detecting screen resolution 1920x1080.
[INFO] [Wayland]: Loaded keymap.
[INFO] [Wayland]: Surface configure: 1920 x 1080.
WARNING: radv is not a conformant vulkan implementation, testing use only.
[INFO] [Vulkan]: Using GPU: AMD RADV PITCAIRN (LLVM 6.0.0)
[INFO] [Vulkan]: Queue family 0 supports 1 sub-queues.
[INFO] [Vulkan]: Swapchain supports present mode: 1.
[INFO] [Vulkan]: Swapchain supports present mode: 2.
[INFO] [Vulkan]: Creating swapchain with present mode: 1
[INFO] [Vulkan]: Using swapchain size 1920 x 1080.
[INFO] [Vulkan]: Got 4 swapchain images.
[INFO] [Vulkan]: Using resolution 1920x1080
[INFO] [Vulkan]: Using RGB565 format.
[INFO] [Vulkan]: GPU supports linear images as textures, but not DEVICE_LOCAL. Falling back to copy path.
[INFO] [Vulkan]: GPU supports linear images as textures, but not DEVICE_LOCAL. Falling back to copy path.
[INFO] [Vulkan]: GPU supports linear images as textures, but not DEVICE_LOCAL. Falling back to copy path.
[INFO] [Vulkan]: GPU supports linear images as textures, but not DEVICE_LOCAL. Falling back to copy path.
[INFO] [Vulkan]: Loading stock shader.
[INFO] [slang]: Building pass #0 (Indisponible)
[INFO] [slang]: Reflection
[INFO] [slang]:   Textures:
[INFO] [slang]:      Source (#0)
[INFO] [slang]:
[INFO] [slang]:   Uniforms (Vertex: yes, Fragment: no):
[INFO] [slang]:   Push Constants (Vertex: no, Fragment: no):
[INFO] [slang]:      MVP (Offset: 0)
[INFO] [slang]:
[INFO] [slang]:   Parameters:
[INFO] [Vulkan filter chain]: Not using frame history.
[INFO] [Vulkan filter chain]: Not using framebuffer feedback.
[INFO] [Device]: Found pad: Wireless Controller on /dev/input/js0.
[INFO] [Joypad]: Found joypad driver: "linuxraw".
[INFO] [Font]: Using font rendering backend: bitmap.
[INFO] [Video]: Found display server: null
[INFO] [SDL audio]: Requested 64 ms latency, got 85 ms
[WARN] Audio rate control was desired, but driver does not support needed features.
[INFO] [Menu]: Found menu display driver: "menu_display_vulkan".
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [Font]: Using font rendering backend: freetype.
[INFO] [LED]: LED driver = 'null' 0x821520
[WARN] Input device ID 517 is unknown to this libretro implementation. Using RETRO_DEVICE_JOYPAD.
[INFO] La SRAM ne sera pas sauvegardée.
[INFO] Chargement du fichier d'historique: [/home/alex/.var/app/org.libretro.RetroArch/config/retroarch/content_history.lpl].
[INFO] Chargement du fichier d'historique: [/home/alex/.var/app/org.libretro.RetroArch/config/retroarch/content_favorites.lpl].
[INFO] Chargement du fichier d'historique: [/home/alex/.var/app/org.libretro.RetroArch/config/retroarch/content_music_history.lpl].
[INFO] Chargement du fichier d'historique: [/home/alex/.var/app/org.libretro.RetroArch/config/retroarch/content_video_history.lpl].
[INFO] Chargement du fichier d'historique: [/home/alex/.var/app/org.libretro.RetroArch/config/retroarch/content_image_history.lpl].
[INFO] [Vulkan]: VSync => off
[INFO] [Vulkan]: GPU supports linear images as textures, but not DEVICE_LOCAL. Falling back to copy path.
[INFO] [Vulkan]: GPU supports linear images as textures, but not DEVICE_LOCAL. Falling back to copy path.
[INFO] [Vulkan]: GPU supports linear images as textures, but not DEVICE_LOCAL. Falling back to copy path.
[INFO] [Vulkan]: GPU supports linear images as textures, but not DEVICE_LOCAL. Falling back to copy path.
[INFO] [slang]: Building pass #0 (Indisponible)
[INFO] [slang]: Reflection
[INFO] [slang]:   Textures:
[INFO] [slang]:      Source (#0)
[INFO] [slang]:
[INFO] [slang]:   Uniforms (Vertex: yes, Fragment: no):
[INFO] [slang]:   Push Constants (Vertex: no, Fragment: no):
[INFO] [slang]:      MVP (Offset: 0)
[INFO] [slang]:
[INFO] [slang]:   Parameters:
[INFO] [Vulkan filter chain]: Not using frame history.
[INFO] [Vulkan filter chain]: Not using framebuffer feedback.
[INFO] [Vulkan]: VSync => on
[INFO] [Vulkan]: Swapchain supports present mode: 1.
[INFO] [Vulkan]: Swapchain supports present mode: 2.
[INFO] [Vulkan]: Creating swapchain with present mode: 2
[INFO] [Vulkan]: Using swapchain size 1920 x 1080.
[INFO] [Vulkan]: Got 4 swapchain images.
[INFO] [Vulkan]: GPU supports linear images as textures, but not DEVICE_LOCAL. Falling back to copy path.
[INFO] [Vulkan]: GPU supports linear images as textures, but not DEVICE_LOCAL. Falling back to copy path.
[INFO] [Vulkan]: GPU supports linear images as textures, but not DEVICE_LOCAL. Falling back to copy path.
[INFO] [Vulkan]: GPU supports linear images as textures, but not DEVICE_LOCAL. Falling back to copy path.
[INFO] [slang]: Building pass #0 (Indisponible)
[INFO] [slang]: Reflection
[INFO] [slang]:   Textures:
[INFO] [slang]:      Source (#0)
[INFO] [slang]:
[INFO] [slang]:   Uniforms (Vertex: yes, Fragment: no):
[INFO] [slang]:   Push Constants (Vertex: no, Fragment: no):
[INFO] [slang]:      MVP (Offset: 0)
[INFO] [slang]:
[INFO] [slang]:   Parameters:
[INFO] [Vulkan filter chain]: Not using frame history.
[INFO] [Vulkan filter chain]: Not using framebuffer feedback.
[INFO] [Wayland]: Surface configure: 1920 x 1080.
[INFO] Using content: /home/alex/Jeux/ISO PSX/Bugs Bunny & Taz-La Spirale Du Temps-PSX-PAL.cue.
[INFO] arg #0: retroarch
[INFO] arg #1: /home/alex/Jeux/ISO PSX/Bugs Bunny & Taz-La Spirale Du Temps-PSX-PAL.cue
[INFO] arg #2: -c
[INFO] arg #3: /home/alex/.var/app/org.libretro.RetroArch/config/retroarch/retroarch.cfg
[INFO] arg #4: -L
[INFO] arg #5: /home/alex/.var/app/org.libretro.RetroArch/config/retroarch/cores/mednafen_psx_hw_libretro.so
[INFO] [Video]: Does not have enough samples for monitor refresh rate estimation. Requires to run for at least 4096 frames.
[INFO] Set config file to : /home/alex/.var/app/org.libretro.RetroArch/config/retroarch/retroarch.cfg
[INFO] RetroArch 1.7.3 (Git b2ceb50)
[INFO] Redirection de la sauvegarde instantanée vers "/home/alex/Jeux/ISO PSX/Bugs Bunny & Taz-La Spirale Du Temps-PSX-PAL.srm".
[INFO] Redirection de la sauvegarde instantanée vers "/home/alex/Jeux/ISO PSX/Bugs Bunny & Taz-La Spirale Du Temps-PSX-PAL.state".
orbea commented 5 years ago

Can you please get a backtrace with debugging symbols?

Also what kernel and mesa versions do you have?

Pickapart commented 5 years ago

uname -a Linux fedora 4.17.14-202.fc28.x86_64 #1 SMP Wed Aug 15 12:29:25 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

glxinfo | grep version

server glx version string: 1.4
client glx version string: 1.4
GLX version: 1.4
    Max core profile version: 4.5
    Max compat profile version: 3.0
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.1
OpenGL core profile version string: 4.5 (Core Profile) Mesa 18.0.5
OpenGL core profile shading language version string: 4.50
OpenGL version string: 3.0 Mesa 18.0.5
OpenGL shading language version string: 1.30
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 18.0.5
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10

I use RetroArch from flathub repo (the rpm version isn't compiled with vulkan support). How to have a backtrace please ?

gouchi commented 5 years ago

Can you try to build it from source ? First install packages needed to build RA for Fedora. For Vulkan please install mesa-vulkan-drivers and mesa-vulkan-devel packages.

Then compile RA with

git clone https://github.com/libretro/RetroArch.git retroarch
cd retroarch
./configure --enable-vulkan && make clean && make DEBUG=1 GL_DEBUG=1 VULKAN_DEBUG=1

At last launch RA and get a backtrace.

gdb ./retroarch
r
bt full

Thank you.

inactive123 commented 5 years ago

@Themaister Got any experience with RADV and Vulkan?

orbea commented 5 years ago

@Pickapart Do you have any problems with the RetroArch menu and radv? Is it still a problem with the latest core builds? I think its probably a core and / or radv issue rather than RetroArch.

Can you open an issue report for the core tracker?

https://github.com/libretro/beetle-psx-libretro/issues

gouchi commented 2 months ago

@Pickapart Please close this issue, if you don't reproduce it anymore.