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
11.33k stars 2.18k forks source link

Missing OpenGL failure does not fallback to Vulkan. #19454

Closed archanox closed 1 month ago

archanox commented 1 month ago

Game or games this happens in

N/A

What area of the game / PPSSPP

Upon running PPSSPP on the first time, with a non-existent ppsspp.ini, on the terminal output we get;

VulkanMayBeAvailable: Device allowed ('SDL:Linux')
Vulkan library loaded ('libvulkan.so')
VulkanMayBeAvailable: Enumerating instance extensions
VulkanMayBeAvailable: Instance extension count: 21
VulkanMaybeAvailable: Instance extension found: VK_KHR_device_group_creation (00000001)
VulkanMaybeAvailable: Instance extension found: VK_KHR_external_fence_capabilities (00000001)
VulkanMaybeAvailable: Instance extension found: VK_KHR_external_memory_capabilities (00000001)
VulkanMaybeAvailable: Instance extension found: VK_KHR_external_semaphore_capabilities (00000001)
VulkanMaybeAvailable: Instance extension found: VK_KHR_get_physical_device_properties2 (00000002)
VulkanMaybeAvailable: Instance extension found: VK_KHR_get_surface_capabilities2 (00000001)
VulkanMaybeAvailable: Instance extension found: VK_KHR_surface (00000019)
VulkanMaybeAvailable: Instance extension found: VK_KHR_wayland_surface (00000006)
VulkanMaybeAvailable: Instance extension found: VK_EXT_debug_report (0000000a)
VulkanMaybeAvailable: Instance extension found: VK_EXT_debug_utils (00000002)
VulkanMaybeAvailable: Instance extension found: VK_KHR_display (00000017)
VulkanMaybeAvailable: Instance extension found: VK_KHR_get_display_properties2 (00000001)
VulkanMaybeAvailable: Instance extension found: VK_KHR_surface_protected_capabilities (00000001)
VulkanMaybeAvailable: Instance extension found: VK_KHR_xcb_surface (00000006)
VulkanMaybeAvailable: Instance extension found: VK_KHR_xlib_surface (00000006)
VulkanMaybeAvailable: Instance extension found: VK_EXT_acquire_drm_display (00000001)
VulkanMaybeAvailable: Instance extension found: VK_EXT_acquire_xlib_display (00000001)
VulkanMaybeAvailable: Instance extension found: VK_EXT_direct_mode_display (00000001)
VulkanMaybeAvailable: Instance extension found: VK_EXT_display_surface_counter (00000001)
VulkanMaybeAvailable: Instance extension found: VK_KHR_portability_enumeration (00000001)
VulkanMaybeAvailable: Instance extension found: VK_LUNARG_direct_driver_loading (00000001)
VulkanMayBeAvailable: Calling vkCreateInstance
VulkanMayBeAvailable: Vulkan test instance created successfully.
VulkanMayBeAvailable: Eligible device found: 'PowerVR B-Series BXE-2-32'
VulkanMayBeAvailable: Found working Vulkan API!
VulkanMayBeAvailable: Destroying instance
DEBUG: Vulkan might be available.
Info: We compiled against SDL version 2.28.3 and we are linking against SDL version 2.28.3. :)
ThreadManager::Init(compute threads: 8, all: 16)
38:00:712 Core/Config.cpp:373 I[G3D]: Longest display side: 1920 pixels. Choosing scale 2
warning: queue 0x2ae1966640 destroyed while proxies still attached:
  wl_display@1 still attached
SDL_CreateWindow failed for GL 4.6: Couldn't find matching EGL config (call to eglChooseConfig failed, reporting an error of EGL_SUCCESS)
warning: queue 0x2ae18b3450 destroyed while proxies still attached:
  wl_display@1 still attached
SDL_CreateWindow failed for GL 4.5: Couldn't find matching EGL config (call to eglChooseConfig failed, reporting an error of EGL_SUCCESS)
warning: queue 0x2ae195b9b0 destroyed while proxies still attached:
  wl_display@1 still attached
SDL_CreateWindow failed for GL 4.4: Couldn't find matching EGL config (call to eglChooseConfig failed, reporting an error of EGL_SUCCESS)
warning: queue 0x2ae194e190 destroyed while proxies still attached:
  wl_display@1 still attached
SDL_CreateWindow failed for GL 4.3: Couldn't find matching EGL config (call to eglChooseConfig failed, reporting an error of EGL_SUCCESS)
warning: queue 0x2ae195bfe0 destroyed while proxies still attached:
  wl_display@1 still attached
SDL_CreateWindow failed for GL 4.2: Couldn't find matching EGL config (call to eglChooseConfig failed, reporting an error of EGL_SUCCESS)
warning: queue 0x2ae195d340 destroyed while proxies still attached:
  wl_display@1 still attached
SDL_CreateWindow failed for GL 4.1: Couldn't find matching EGL config (call to eglChooseConfig failed, reporting an error of EGL_SUCCESS)
warning: queue 0x2ae1958a80 destroyed while proxies still attached:
  wl_display@1 still attached
SDL_CreateWindow failed for GL 4.0: Couldn't find matching EGL config (call to eglChooseConfig failed, reporting an error of EGL_SUCCESS)
warning: queue 0x2ae194e190 destroyed while proxies still attached:
  wl_display@1 still attached
SDL_CreateWindow failed for GL 3.3: Couldn't find matching EGL config (call to eglChooseConfig failed, reporting an error of EGL_SUCCESS)
warning: queue 0x2ae19082f0 destroyed while proxies still attached:
  wl_display@1 still attached
SDL_CreateWindow failed for GL 3.2: Couldn't find matching EGL config (call to eglChooseConfig failed, reporting an error of EGL_SUCCESS)
warning: queue 0x2ae195e430 destroyed while proxies still attached:
  wl_display@1 still attached
SDL_CreateWindow failed for GL 3.1: Couldn't find matching EGL config (call to eglChooseConfig failed, reporting an error of EGL_SUCCESS)
warning: queue 0x2ae195b640 destroyed while proxies still attached:
  wl_display@1 still attached
SDL_CreateWindow failed for GL 3.0: Couldn't find matching EGL config (call to eglChooseConfig failed, reporting an error of EGL_SUCCESS)
warning: queue 0x2ae18b2b10 destroyed while proxies still attached:
  wl_display@1 still attached
SDL_CreateWindow failed: Couldn't find matching EGL config (call to eglChooseConfig failed, reporting an error of EGL_SUCCESS)
GL init error ''
SDL: Trying a different audio device
Failed to open audio device: Audio subsystem is not initialized
loading control pad mappings from gamecontrollerdb.txt: SUCCESS!
NativeInitGraphics
(/home/pierce/ppsspp/UI/NativeApp.cpp:NativeInitGraphics:805): [g_screenManager] (menu, 1.0s) No screenmanager, bad init order. Backend = 0
(/home/pierce/ppsspp/UI/NativeApp.cpp:NativeInitGraphics:805): [g_screenManager] (menu, 1.0s) No screenmanager, bad init order. Segmentation fault (core dumped)

then it returns to the prompt. The ini now has

GraphicsBackend = 0 (OPENGL)
FailedGraphicsBackends = OPENGL

Rerunning PPSSPPSDL a subsequent time gets us

VulkanMayBeAvailable: Device allowed ('SDL:Linux')
Vulkan library loaded ('libvulkan.so')
VulkanMayBeAvailable: Enumerating instance extensions
VulkanMayBeAvailable: Instance extension count: 21
VulkanMaybeAvailable: Instance extension found: VK_KHR_device_group_creation (00000001)
VulkanMaybeAvailable: Instance extension found: VK_KHR_external_fence_capabilities (00000001)
VulkanMaybeAvailable: Instance extension found: VK_KHR_external_memory_capabilities (00000001)
VulkanMaybeAvailable: Instance extension found: VK_KHR_external_semaphore_capabilities (00000001)
VulkanMaybeAvailable: Instance extension found: VK_KHR_get_physical_device_properties2 (00000002)
VulkanMaybeAvailable: Instance extension found: VK_KHR_get_surface_capabilities2 (00000001)
VulkanMaybeAvailable: Instance extension found: VK_KHR_surface (00000019)
VulkanMaybeAvailable: Instance extension found: VK_KHR_wayland_surface (00000006)
VulkanMaybeAvailable: Instance extension found: VK_EXT_debug_report (0000000a)
VulkanMaybeAvailable: Instance extension found: VK_EXT_debug_utils (00000002)
VulkanMaybeAvailable: Instance extension found: VK_KHR_display (00000017)
VulkanMaybeAvailable: Instance extension found: VK_KHR_get_display_properties2 (00000001)
VulkanMaybeAvailable: Instance extension found: VK_KHR_surface_protected_capabilities (00000001)
VulkanMaybeAvailable: Instance extension found: VK_KHR_xcb_surface (00000006)
VulkanMaybeAvailable: Instance extension found: VK_KHR_xlib_surface (00000006)
VulkanMaybeAvailable: Instance extension found: VK_EXT_acquire_drm_display (00000001)
VulkanMaybeAvailable: Instance extension found: VK_EXT_acquire_xlib_display (00000001)
VulkanMaybeAvailable: Instance extension found: VK_EXT_direct_mode_display (00000001)
VulkanMaybeAvailable: Instance extension found: VK_EXT_display_surface_counter (00000001)
VulkanMaybeAvailable: Instance extension found: VK_KHR_portability_enumeration (00000001)
VulkanMaybeAvailable: Instance extension found: VK_LUNARG_direct_driver_loading (00000001)
VulkanMayBeAvailable: Calling vkCreateInstance
VulkanMayBeAvailable: Vulkan test instance created successfully.
VulkanMayBeAvailable: Eligible device found: 'PowerVR B-Series BXE-2-32'
VulkanMayBeAvailable: Found working Vulkan API!
VulkanMayBeAvailable: Destroying instance
DEBUG: Vulkan might be available.
Info: We compiled against SDL version 2.28.3 and we are linking against SDL version 2.28.3. :)
ThreadManager::Init(compute threads: 8, all: 16)
42:28:276 Core/Config.cpp:373 I[G3D]: Longest display side: 1920 pixels. Choosing scale 2
42:28:291 UI/NativeApp.cpp:320 E[LOADER]: Failed graphics backends: OPENGL
warning: queue 0x2aad4cf1d0 destroyed while proxies still attached:
  wl_display@1 still attached
SDL_CreateWindow failed for GL 4.6: Couldn't find matching EGL config (call to eglChooseConfig failed, reporting an error of EGL_SUCCESS)
warning: queue 0x2aad64aa60 destroyed while proxies still attached:
  wl_display@1 still attached
SDL_CreateWindow failed for GL 4.5: Couldn't find matching EGL config (call to eglChooseConfig failed, reporting an error of EGL_SUCCESS)
warning: queue 0x2aad64bfd0 destroyed while proxies still attached:
  wl_display@1 still attached
SDL_CreateWindow failed for GL 4.4: Couldn't find matching EGL config (call to eglChooseConfig failed, reporting an error of EGL_SUCCESS)
warning: queue 0x2aad64ce80 destroyed while proxies still attached:
  wl_display@1 still attached
SDL_CreateWindow failed for GL 4.3: Couldn't find matching EGL config (call to eglChooseConfig failed, reporting an error of EGL_SUCCESS)
warning: queue 0x2aad651f80 destroyed while proxies still attached:
  wl_display@1 still attached
SDL_CreateWindow failed for GL 4.2: Couldn't find matching EGL config (call to eglChooseConfig failed, reporting an error of EGL_SUCCESS)
warning: queue 0x2aad64f480 destroyed while proxies still attached:
  wl_display@1 still attached
SDL_CreateWindow failed for GL 4.1: Couldn't find matching EGL config (call to eglChooseConfig failed, reporting an error of EGL_SUCCESS)
warning: queue 0x2aad643df0 destroyed while proxies still attached:
  wl_display@1 still attached
SDL_CreateWindow failed for GL 4.0: Couldn't find matching EGL config (call to eglChooseConfig failed, reporting an error of EGL_SUCCESS)
warning: queue 0x2aad645780 destroyed while proxies still attached:
  wl_display@1 still attached
SDL_CreateWindow failed for GL 3.3: Couldn't find matching EGL config (call to eglChooseConfig failed, reporting an error of EGL_SUCCESS)
warning: queue 0x2aad64ce30 destroyed while proxies still attached:
  wl_display@1 still attached
SDL_CreateWindow failed for GL 3.2: Couldn't find matching EGL config (call to eglChooseConfig failed, reporting an error of EGL_SUCCESS)
warning: queue 0x2aad652020 destroyed while proxies still attached:
  wl_display@1 still attached
SDL_CreateWindow failed for GL 3.1: Couldn't find matching EGL config (call to eglChooseConfig failed, reporting an error of EGL_SUCCESS)
warning: queue 0x2aad64c980 destroyed while proxies still attached:
  wl_display@1 still attached
SDL_CreateWindow failed for GL 3.0: Couldn't find matching EGL config (call to eglChooseConfig failed, reporting an error of EGL_SUCCESS)
warning: queue 0x2aad674500 destroyed while proxies still attached:
  wl_display@1 still attached
SDL_CreateWindow failed: Couldn't find matching EGL config (call to eglChooseConfig failed, reporting an error of EGL_SUCCESS)
GL init error ''
SDL: Trying a different audio device
Failed to open audio device: Audio subsystem is not initialized
loading control pad mappings from gamecontrollerdb.txt: SUCCESS!
NativeInitGraphics
(/home/pierce/ppsspp/UI/NativeApp.cpp:NativeInitGraphics:805): [g_screenManager] (menu, 1.0s) No screenmanager, bad init order. Backend = 0
(/home/pierce/ppsspp/UI/NativeApp.cpp:NativeInitGraphics:805): [g_screenManager] (menu, 1.0s) No screenmanager, bad init order. Segmentation fault (core dumped)

This will constantly happen until the user goes into the ppsspp.ini and edits GraphicsBackend to 3 (VULKAN). Despite the failed backend being listed in the ini, it is still accessible in the UI and able to be selected thereby reverting the manual change and forcing the user to repeat the process.

What should happen

Logs

No response

Platform

Linux / BSD

Mobile device model or graphics card (GPU)

PowerVR B-Series BXE-2-32

PPSSPP version affected

v1.17.1-957-g52cf10274c

Last working version

No response

Graphics backend (3D API)

OpenGL / GLES

Checklist

hrydgard commented 1 month ago

Yeah there's some bug here, thanks for reporting!