lr-citra compilation for RetroPie (segfaults)
-
I've managed to compile this version of lr-citra here (https://github.com/StonedEdge/citra-1) with the following package flags set in my build environment for the RK3588s:
export NM=aarch64-linux-gnu-nm
export AR=aarch64-linux-gnu-ar
export CC=aarch64-linux-gnu-gcc
export CXX=aarch64-linux-gnu-g++
export OPENGL_SUPPORT=yes
export PKG_BUILD_FLAGS="+lto -sysroot"
export PKG_TOOLCHAIN="make"
make -j$(nproc)The citra_libretro.so binary builds, however when trying to load a game, it just gives me segmentation faults... I need to set the driver to glcore otherwise nothing attempts to load. I am guessing this core also requires Open GL GLSL 3.3 shaders, which we only have 3.1 with Panfork...
I had to build RetroArch with the following changes (i.e OpenGL instead of OpenGLES to get it to boot at all, otherwise it would complain that OpenGL3.3 is not supported):
function build_retroarch() { local params=(--disable-sdl --enable-sdl2 --disable-oss --disable-al --disable-jack --disable-qt) if ! isPlatform "x11"; then params+=(--disable-pulse) ! isPlatform "mesa" && params+=(--disable-x11) fi if [[ "$__os_debian_ver" -lt 9 ]]; then params+=(--disable-ffmpeg) fi # Remove GLES options and add GL options if necessary # params+=(--disable-opengles --disable-opengles3 --disable-opengles3_1 --disable-opengles3_2) params+=(--enable-opengl) # Add other platform-specific options as needed ./configure --prefix="$md_inst" "${params[@]}" make clean make md_ret_require="$md_build/retroarch" }
Anyone else with RetroPie running panfork drivers on RK3588 want to give it a try? GPU drivers definitely support OpenGL 3.3 as according to glxinfo. Also I checked System Information in RetroArch and it says OpenGL is enabled, just not sure how to check if it is running with Open GL3.3 or not.
[INFO] [Config]: Looking for config in: "/home/retrolite/.config/retroarch/retroarch.cfg". [INFO] RetroArch 1.19.1 (Git e948222) [INFO] === Build ======================================= [INFO] Capabilities: ASIMD [INFO] Version: 1.19.1 [INFO] Git: e948222 [INFO] Built: Jul 11 2024 [INFO] ================================================= [INFO] [Input]: Found input driver: "x". [ERROR] Couldn't find any cloud sync driver named "" [INFO] Available cloud sync drivers are: [INFO] webdav [INFO] null [WARN] Going to default to first cloud sync driver... [INFO] Cannot resolve save file path. [INFO] Cannot resolve save state file path. [INFO] [Environ]: SET_PIXEL_FORMAT: RGB565. [INFO] [Core]: Version of libretro API: 1, Compiled against API: 1 [INFO] [Core]: Geometry: 320x240, Aspect: 1.333, FPS: 60.00, Sample rate: 48000.00 Hz. [INFO] [Audio]: Set audio input rate to: 48000.00 Hz. [INFO] [Video]: Set video size to: fullscreen. [INFO] [Wayland]: Compositor doesn't support zwp_idle_inhibit_manager_v1 protocol [INFO] [Wayland]: Compositor doesn't support zxdg_decoration_manager_v1 protocol Couldn't open plugin directory: No such file or directory No plugins found, falling back on no decorations [INFO] [EGL] Found EGL client version >= 1.5, trying eglGetPlatformDisplay [INFO] [EGL]: EGL version: 1.4 [INFO] [GL]: Found GL context: "wayland". [INFO] [GL]: Detecting screen resolution: 1280x720. [INFO] [EGL]: Current context: 0xaaab15e26e50. [INFO] [Wayland] Failed to specify monitor for fullscreen, letting compositor decide [INFO] [GL]: Vendor: Panfrost, Renderer: Mali-G610 (Panfrost). [INFO] [GL]: Version: 3.3 (Compatibility Profile) Mesa 23.0.0-devel. [INFO] [GL]: Using ARB_sync to reduce latency. [INFO] [GL]: Using resolution 1280x720. [INFO] [GL]: Default shader backend found: glsl. [INFO] [Shader driver]: Using GLSL shader backend. [INFO] [GLSL]: Checking GLSL shader support ... [WARN] [GL]: Stock GLSL shaders will be used. [INFO] [GLSL]: Found GLSL vertex shader. [INFO] [GLSL]: Found GLSL fragment shader. [INFO] [GLSL]: Linking GLSL program. [INFO] [GLSL]: Found GLSL vertex shader. [INFO] [GLSL]: Found GLSL fragment shader. [INFO] [GLSL]: Linking GLSL program. [INFO] [GLSL]: Found GLSL vertex shader. [INFO] [GLSL]: Found GLSL fragment shader. [INFO] [GLSL]: Linking GLSL program. [INFO] [GL]: Using 4 textures. [INFO] [GL]: Loaded 1 program(s). [INFO] [GL]: Using GL_RGB565 for texture uploads. [INFO] [udev]: Pad #0 (/dev/input/event3) supports 0 force feedback effects. [INFO] [Autoconf]: Retro Lite CM5 Gamepad configured in port 1. [INFO] [Joypad]: Found joypad driver: "udev". [INFO] [Video]: Found display server: "null". [INFO] [ALSA] Using ALSA version 1.2.6.1 [INFO] [Microphone]: Initialized microphone driver. [INFO] [Display]: Found display driver: "gl".
Verbose output after loading a game:
[INFO] [Config]: Looking for config in: "/home/retrolite/.config/retroarch/retroarch.cfg". [INFO] RetroArch 1.19.1 (Git e948222) [INFO] === Build ======================================= [INFO] Capabilities: ASIMD [INFO] Version: 1.19.1 [INFO] Git: e948222 [INFO] Built: Jul 11 2024 [INFO] ================================================= [INFO] [Input]: Found input driver: "x". [ERROR] Couldn't find any cloud sync driver named "" [INFO] Available cloud sync drivers are: [INFO] webdav [INFO] null [WARN] Going to default to first cloud sync driver... [INFO] Cannot resolve save file path. [INFO] Cannot resolve save state file path. [INFO] [Environ]: SET_PIXEL_FORMAT: RGB565. [INFO] [Core]: Version of libretro API: 1, Compiled against API: 1 [INFO] [Core]: Geometry: 320x240, Aspect: 1.333, FPS: 60.00, Sample rate: 48000.00 Hz. [INFO] [Audio]: Set audio input rate to: 48000.00 Hz. [INFO] [Video]: Set video size to: fullscreen. [INFO] [Wayland]: Compositor doesn't support zwp_idle_inhibit_manager_v1 protocol [INFO] [Wayland]: Compositor doesn't support zxdg_decoration_manager_v1 protocol Couldn't open plugin directory: No such file or directory No plugins found, falling back on no decorations [INFO] [EGL] Found EGL client version >= 1.5, trying eglGetPlatformDisplay [INFO] [EGL]: EGL version: 1.4 [INFO] [GL]: Found GL context: "wayland". [INFO] [GL]: Detecting screen resolution: 1280x720. [INFO] [EGL]: Current context: 0xaaaae92323d0. [INFO] [Wayland] Failed to specify monitor for fullscreen, letting compositor decide [INFO] [GL]: Vendor: Panfrost, Renderer: Mali-G610 (Panfrost). [INFO] [GL]: Version: 3.3 (Compatibility Profile) Mesa 23.0.0-devel. [INFO] [GL]: Using ARB_sync to reduce latency. [INFO] [GL]: Using resolution 1280x720. [INFO] [GL]: Default shader backend found: glsl. [INFO] [Shader driver]: Using GLSL shader backend. [INFO] [GLSL]: Checking GLSL shader support ... [WARN] [GL]: Stock GLSL shaders will be used. [INFO] [GLSL]: Found GLSL vertex shader. [INFO] [GLSL]: Found GLSL fragment shader. [INFO] [GLSL]: Linking GLSL program. [INFO] [GLSL]: Found GLSL vertex shader. [INFO] [GLSL]: Found GLSL fragment shader. [INFO] [GLSL]: Linking GLSL program. [INFO] [GLSL]: Found GLSL vertex shader. [INFO] [GLSL]: Found GLSL fragment shader. [INFO] [GLSL]: Linking GLSL program. [INFO] [GL]: Using 4 textures. [INFO] [GL]: Loaded 1 program(s). [INFO] [GL]: Using GL_RGB565 for texture uploads. [INFO] [udev]: Pad #0 (/dev/input/event3) supports 0 force feedback effects. [INFO] [Autoconf]: Retro Lite CM5 Gamepad configured in port 1. [INFO] [Joypad]: Found joypad driver: "udev". [INFO] [Video]: Found display server: "null". [INFO] [ALSA] Using ALSA version 1.2.6.1 [INFO] [Microphone]: Initialized microphone driver. [INFO] [Display]: Found display driver: "gl". [INFO] [Playlist]: Loading history file: "/home/retrolite/.config/retroarch/content_history.lpl". [INFO] [Playlist]: Loading history file: "/home/retrolite/.config/retroarch/content_music_history.lpl". [INFO] [Playlist]: Loading history file: "/home/retrolite/.config/retroarch/content_video_history.lpl". [INFO] [Playlist]: Loading history file: "/home/retrolite/.config/retroarch/content_image_history.lpl". [INFO] [Playlist]: Loading favorites file: "/home/retrolite/.config/retroarch/content_favorites.lpl". [ERROR] failed_to_start_audio_driver [INFO] [Content]: Updating firmware status for: "/opt/retropie/libretrocores/lr-citra/citra_libretro.so" on "/media/retrolite/CM5Handheld/roms/3ds/". [INFO] [Core]: Using content: "/media/retrolite/CM5Handheld/roms/3ds/Mario.3ds". [INFO] [Core]: Content ran for a total of: 00 hours, 00 minutes, 00 seconds. [INFO] [Core]: Unloading core.. [INFO] [Core]: Unloading core symbols.. [INFO] RetroArch 1.19.1 (Git e948222) [INFO] === Build ======================================= [INFO] Capabilities: ASIMD [INFO] Version: 1.19.1 [INFO] Git: e948222 [INFO] Built: Jul 11 2024 [INFO] ================================================= [INFO] [Input]: Found input driver: "x". [ERROR] Couldn't find any cloud sync driver named "" [INFO] Available cloud sync drivers are: [INFO] webdav [INFO] null [WARN] Going to default to first cloud sync driver... [INFO] [Core]: Loading dynamic libretro core from: "/opt/retropie/libretrocores/lr-citra/citra_libretro.so" [INFO] [Overrides]: Redirecting save file to "/media/retrolite/CM5Handheld/roms/3ds/Citra/Mario.srm". [INFO] [Overrides]: Redirecting save state to "/media/retrolite/CM5Handheld/roms/3ds/Citra/Mario.state". [INFO] [Environ]: SET_VARIABLES. [INFO] [Environ]: SET_CONTROLLER_INFO. [INFO] [Environ]: GET_LOG_INTERFACE. [INFO] [Content]: Content loading skipped. Implementation will load it on its own. [INFO] [Environ]: SET_HW_SHARED_CONTEXT. [INFO] [Environ]: SET_PIXEL_FORMAT: XRGB8888. [INFO] [Environ]: SET_HW_RENDER, context type: glcore. [INFO] Requesting core OpenGL context (3.3). [INFO] [Environ]: SET_INPUT_DESCRIPTORS: [INFO] [libretro INFO] Frontend @ citra_libretro/citra_libretro.cpp:retro_load_game:596: Starting Citra RetroArch game... [Environ]: SAVE_DIRECTORY: "/media/retrolite/CM5Handheld/roms/3ds/Citra". [INFO] [Environ]: SET_GEOMETRY: 400x480, Aspect: 0.833. [libretro INFO] Common.Filesystem @ common/file_util.cpp:SetUserPath:713: Using /media/retrolite/CM5Handheld/roms/3ds/Citra/Citra/ as the user directory [libretro INFO] Frontend @ citra_libretro/citra_libretro.cpp:UpdateSettings:447: User dir set to "/media/retrolite/CM5Handheld/roms/3ds/Citra/Citra/". [libretro WARN] Core @ core/core.cpp:Init:378: CPU JIT requested, but Dynarmic not available [libretro INFO] RPC_Server @ core/rpc/rpc_server.cpp:RPCServer:12: Starting RPC server ... [libretro INFO] RPC_Server @ core/rpc/rpc_server.cpp:HandleRequestsLoop:113: Request handler started. [libretro INFO] RPC_Server @ core/rpc/rpc_server.cpp:RPCServer:16: RPC started. [libretro ERROR] Service.NWM @ core/hle/service/nwm/nwm_uds.cpp:NWM_UDS:1518: Network isn't initalized [libretro ERROR] Service.HTTP @ core/hle/service/http_c.cpp:DecryptClCertA:806: ClCertA file missing [libretro ERROR] Core @ core/telemetry_session.cpp:GetTelemetryId:47: failed to open telemetry_id: /media/retrolite/CM5Handheld/roms/3ds/Citra/Citra/config/telemetry_id [libretro INFO] Loader @ core/loader/ncch.cpp:Load:192: Program ID: 000400000007AE00 [libretro WARN] Service.FS @ core/file_sys/ncch_container.cpp:OpenFile:130: Failed to open /media/retrolite/CM5Handheld/roms/3ds/Citra/Citra/sdmc/Nintendo 3DS/00000000000000000000000000000000/00000000000000000000000000000000/title/0004000e/0007ae00/content/00000000.app [libretro INFO] Loader @ core/hle/kernel/process.cpp:ParseKernelCaps:141: ExHeader kernel version: 2.32 [libretro INFO] Service.FS @ core/file_sys/ncch_container.cpp:LoadSectionExeFS:505: Attempting to load logo from the ExeFS [libretro INFO] Service.CFG @ core/hle/service/cfg/cfg.cpp:SetPreferredRegionCodes:660: Preferred region code set to 1 [INFO] [SRAM]: Skipping SRAM load. [INFO] [Core]: Version of libretro API: 1, Compiled against API: 1 [INFO] [Core]: Geometry: 400x480, Aspect: 0.000, FPS: 60.00, Sample rate: 32728.00 Hz. [INFO] [Audio]: Set audio input rate to: 32728.00 Hz. [INFO] [Video]: Set video size to: fullscreen. [INFO] [Video]: Using HW render, glcore driver forced. [INFO] [Wayland]: Compositor doesn't support zwp_idle_inhibit_manager_v1 protocol [INFO] [Wayland]: Compositor doesn't support zxdg_decoration_manager_v1 protocol Couldn't open plugin directory: No such file or directory No plugins found, falling back on no decorations [INFO] [EGL] Found EGL client version >= 1.5, trying eglGetPlatformDisplay [INFO] [EGL]: EGL version: 1.4 [INFO] [GLCore]: Found GL context: "wayland". [INFO] [GLCore]: Detecting screen resolution: 1280x720. [INFO] [EGL]: Created shared context: 0xaaaae91d81e0. [INFO] [EGL]: Current context: 0xaaaaec146180. [INFO] [Wayland] Failed to specify monitor for fullscreen, letting compositor decide [INFO] [GLCore]: Initializing HW render (8192x8192). [INFO] [GLCore]: Max texture size: 8192 px, renderbuffer size: 8192 px. [INFO] [GLCore]: Vendor: Panfrost, Renderer: Mali-G610 (Panfrost). [INFO] [GLCore]: Version: 3.3 (Core Profile) Mesa 23.0.0-devel. [INFO] [GLCore]: Using resolution 1280x720. [INFO] [udev]: Pad #0 (/dev/input/event3) supports 0 force feedback effects. [INFO] [Joypad]: Found joypad driver: "udev". [INFO] [GLCore]: Loading stock shader. [INFO] [slang]: Building pass #0 (N/A) [INFO] [GLCore]: Not using frame history. [INFO] [GLCore]: Not using framebuffer feedback. [INFO] [Video]: Found display server: "null". [libretro INFO] Render.OpenGL @ video_core/renderer_opengl/renderer_opengl.cpp:Init:988: GL_VERSION: 3.3 (Core Profile) Mesa 23.0.0-devel [libretro INFO] Render.OpenGL @ video_core/renderer_opengl/renderer_opengl.cpp:Init:989: GL_VENDOR: Panfrost [libretro INFO] Render.OpenGL @ video_core/renderer_opengl/renderer_opengl.cpp:Init:990: GL_RENDERER: Mali-G610 (Panfrost) [libretro INFO] Render.OpenGL @ video_core/renderer_opengl/gl_format_reinterpreter.cpp:FormatReinterpreterOpenGL:382: Using pbo for D24S8 to RGBA8 reinterpretation [libretro WARN] Render.OpenGL @ video_core/renderer_opengl/gl_rasterizer.cpp:RasterizerOpenGL:66: ARB_copy_image not supported. Some games might produce artifacts. [libretro INFO] Render.OpenGL @ video_core/renderer_opengl/gl_shader_disk_cache.cpp:LoadTransferable:169: Found a transferable disk cache with 1 entries [libretro INFO] Render.OpenGL @ video_core/renderer_opengl/gl_shader_disk_cache.cpp:LoadPrecompiledFile:266: Found a precompiled disk cache with 1 decompiled entries and 1 binary entries [INFO] [Environ]: SET_GEOMETRY: 400x480, Aspect: 0.833. [INFO] [ALSA] Using ALSA version 1.2.6.1 [INFO] [Microphone]: Initialized microphone driver. [INFO] [Display]: Found display driver: "glcore". [INFO] [Playlist]: Loading history file: "/home/retrolite/.config/retroarch/content_history.lpl". [INFO] [Playlist]: Loading history file: "/home/retrolite/.config/retroarch/content_music_history.lpl". [INFO] [Playlist]: Loading history file: "/home/retrolite/.config/retroarch/content_video_history.lpl". [INFO] [Playlist]: Loading history file: "/home/retrolite/.config/retroarch/content_image_history.lpl". [INFO] [Playlist]: Loading favorites file: "/home/retrolite/.config/retroarch/content_favorites.lpl". [ERROR] failed_to_start_audio_driver [libretro WARN] Service.SRV @ core/hle/service/sm/srv.cpp:RegisterClient:63: (STUBBED) called. Caller PID=11 [libretro WARN] Service.SRV @ core/hle/service/sm/srv.cpp:EnableNotification:85: (STUBBED) called [libretro WARN] Service.APT @ core/hle/service/apt/apt.cpp:GetLockHandle:317: (STUBBED) called applet_attributes=0X00000000 [libretro WARN] Service.NDM @ core/hle/service/ndm/ndm_u.cpp:OverrideDefaultDaemons:186: (STUBBED) bit_mask=0x0000000F [libretro WARN] Service.NDM @ core/hle/service/ndm/ndm_u.cpp:SuspendDaemons:74: (STUBBED) bit_mask=0x00000006 [libretro WARN] Service.FS @ core/hle/service/fs/fs_user.cpp:InitializeWithSdkVersion:600: (STUBBED) called, version: 0x040100C8 [libretro ERROR] Service.FS @ core/file_sys/archive_backend.h:GetOpenDelayNs:193: Delay generator was not initalized. Using default [libretro ERROR] Service.FS @ core/file_sys/archive_backend.h:GetOpenDelayNs:193: Delay generator was not initalized. Using default [libretro ERROR] Service.FS @ core/hle/service/fs/fs_user.cpp:OpenArchive:335: failed to get a handle for archive archive_id=0x00000004 archive_path=[Empty] [libretro WARN] Service.BOSS @ core/hle/service/boss/boss.cpp:InitializeSession:23: (STUBBED) programID=0X0000000000000000 [libretro ERROR] Service @ core/hle/service/service.cpp:ReportUnimplementedFunction:161: unknown / unimplemented function 'Initialize': port='nim:aoc' cmd_buf={[0]=0x210000} [libretro WARN] Service.APT @ core/hle/service/apt/apt.cpp:NotifyToWait:296: (STUBBED) app_id=768 [libretro WARN] Service.APT @ core/hle/service/apt/apt.cpp:AppletUtility:590: (STUBBED) called command=0X00000007, input_size=0X00000004, output_size=0X00000001 [libretro WARN] Service.APT @ core/hle/service/apt/apt.cpp:AppletUtility:590: (STUBBED) called command=0X00000004, input_size=0X00000001, output_size=0X00000001 [libretro WARN] Service.GSP @ core/hle/service/gsp/gsp_gpu.cpp:AcquireRight:705: called flag=00000000 process=11 thread_id=0 [libretro ERROR] Render.OpenGL @ video_core/renderer_opengl/gl_rasterizer_cache.cpp:MortonCopy:188: Out of bound texture [libretro ERROR] Service.FS @ core/file_sys/archive_extsavedata.cpp:OpenFile:141: /media/retrolite/CM5Handheld/roms/3ds/Citra/Citra/nand/data/00000000000000000000000000000000/extdata/00048000/F000000B/user/ublg.lst not found [libretro ERROR] Service.FS @ core/hle/service/fs/fs_user.cpp:OpenFile:77: failed to get a handle for file [Wchar: /ublg.lst] [libretro ERROR] Service.FS @ core/file_sys/archive_backend.h:GetOpenDelayNs:193: Delay generator was not initalized. Using default [libretro WARN] Service.FS @ core/file_sys/archive_ncch.cpp:OpenFile:138: Mii data file missing. Loading open source replacement from memory [libretro ERROR] Service @ core/hle/service/service.cpp:ReportUnimplementedFunction:161: unknown / unimplemented function 'SetInternalPriorities': port='gsp::Gpu' cmd_buf={[0]=0x1e0080, [1]=0x19, [2]=0x1a} [libretro WARN] Service.SRV @ core/hle/service/sm/srv.cpp:Subscribe:210: (STUBBED) called, notification_id=0x209 [libretro WARN] Service.SRV @ core/hle/service/sm/srv.cpp:Subscribe:210: (STUBBED) called, notification_id=0x207 [libretro WARN] Service.APT @ core/hle/service/apt/apt.cpp:SetAppCpuTimeLimit:607: (STUBBED) called, cpu_percent=30, value=1 [libretro INFO] Service.DSP @ audio_core/hle/hle.cpp:LoadComponent:496: Firmware hash: 0x3318473a60c8e953 [libretro INFO] Service.DSP @ audio_core/hle/hle.cpp:LoadComponent:500: Structures hash: 0x228655de1258d999 [libretro INFO] Service.DSP @ core/hle/service/dsp/dsp_dsp.cpp:LoadComponent:188: called size=0xC20A, prog_mask=0x000000FF, data_mask=0x001200FF [libretro INFO] Service.DSP @ core/hle/service/dsp/dsp_dsp.cpp:RegisterInterruptEvents:254: Registered interrupt=2, channel=2, event=event-0015ae48 [libretro WARN] Service.DSP @ core/hle/service/dsp/dsp_dsp.cpp:GetSemaphoreEventHandle:271: (STUBBED) called [libretro WARN] Service.DSP @ core/hle/service/dsp/dsp_dsp.cpp:SetSemaphoreMask:281: (STUBBED) called mask=0x2000 [libretro INFO] Audio.DSP @ audio_core/hle/hle.cpp:PipeWrite:257: Application has requested initialization of DSP hardware [libretro INFO] Service.DSP @ core/hle/service/dsp/dsp_dsp.cpp:SetSemaphore:57: called, semaphore_value=4000 [libretro INFO] Service.DSP @ core/hle/service/dsp/dsp_dsp.cpp:SetSemaphore:57: called, semaphore_value=4000 [libretro WARN] Service.APT @ core/hle/service/apt/apt.cpp:AppletUtility:590: (STUBBED) called command=0X00000004, input_size=0X00000001, output_size=0X00000001 [libretro WARN] Service.FS @ core/file_sys/archive_ncch.cpp:OpenFile:148: Shared Font file missing. Loading open source replacement from memory [libretro ERROR] Render.OpenGL @ video_core/renderer_opengl/renderer_opengl.cpp:DebugHandler:964: SHADER_COMPILER ERROR 1: 0:6(24): error: maximum output vertices (3) exceeds GL_MAX_GEOMETRY_OUTPUT_VERTICES [libretro ERROR] Render.OpenGL @ video_core/renderer_opengl/gl_shader_util.cpp:LoadShader:63: Error compiling geometry shader: 0:6(24): error: maximum output vertices (3) exceeds GL_MAX_GEOMETRY_OUTPUT_VERTICES [libretro ERROR] Render.OpenGL @ video_core/renderer_opengl/gl_shader_util.cpp:LoadShader:65: Shader source code: #version 330 #extension GL_ARB_separate_shader_objects : enable layout(triangles) in; layout(triangle_strip, max_vertices = 3) out; layout (location=1) out vec4 primary_color; layout (location=2) out vec2 texcoord0; layout (location=3) out vec2 texcoord1; layout (location=4) out vec2 texcoord2; layout (location=5) out float texcoord0_w; layout (location=6) out vec4 normquat; layout (location=7) out vec3 view; out gl_PerVertex { vec4 gl_Position; #if !defined(CITRA_GLES) || defined(GL_EXT_clip_cull_distance) float gl_ClipDistance[2]; #endif // !defined(CITRA_GLES) || defined(GL_EXT_clip_cull_distance) }; #define NUM_TEV_STAGES 6 #define NUM_LIGHTS 8 #define NUM_LIGHTING_SAMPLERS 24 struct LightSrc { vec3 specular_0; vec3 specular_1; vec3 diffuse; vec3 ambient; vec3 position; vec3 spot_direction; float dist_atten_bias; float dist_atten_scale; }; layout (std140) uniform shader_data { int framebuffer_scale; int alphatest_ref; float depth_scale; float depth_offset; float shadow_bias_constant; float shadow_bias_linear; int scissor_x1; int scissor_y1; int scissor_x2; int scissor_y2; int fog_lut_offset; int proctex_noise_lut_offset; int proctex_color_map_offset; int proctex_alpha_map_offset; int proctex_lut_offset; int proctex_diff_lut_offset; float proctex_bias; int shadow_texture_bias; ivec4 lighting_lut_offset[NUM_LIGHTING_SAMPLERS / 4]; vec3 fog_color; vec2 proctex_noise_f; vec2 proctex_noise_a; vec2 proctex_noise_p; vec3 lighting_global_ambient; LightSrc light_src[NUM_LIGHTS]; vec4 const_color[NUM_TEV_STAGES]; vec4 tev_combiner_buffer_color; vec4 clip_coef; }; struct pica_uniforms { bool b[16]; uvec4 i[4]; vec4 f[96]; }; bool exec_shader(); layout(location = 0) in vec4 vs_out_attr0[]; layout(location = 1) in vec4 vs_out_attr1[]; layout(location = 2) in vec4 vs_out_attr2[]; layout(location = 3) in vec4 vs_out_attr3[]; layout(location = 4) in vec4 vs_out_attr4[]; struct Vertex { vec4 attributes[5]; }; vec4 GetVertexQuaternion(Vertex vtx) { return vec4(0.0, 0.0, 0.0, 0.0); } void EmitVtx(Vertex vtx, bool quats_opposite) { vec4 vtx_pos = vec4(vtx.attributes[0].x, vtx.attributes[0].y, vtx.attributes[0].z, vtx.attributes[0].w); gl_Position = vtx_pos; #if !defined(CITRA_GLES) || defined(GL_EXT_clip_cull_distance) gl_ClipDistance[0] = -vtx_pos.z; gl_ClipDistance[1] = dot(clip_coef, vtx_pos); #endif // !defined(CITRA_GLES) || defined(GL_EXT_clip_cull_distance) vec4 vtx_quat = GetVertexQuaternion(vtx); normquat = mix(vtx_quat, -vtx_quat, bvec4(quats_opposite)); vec4 vtx_color = vec4(vtx.attributes[1].x, vtx.attributes[1].y, vtx.attributes[1].z, vtx.attributes[1].w); primary_color = min(abs(vtx_color), vec4(1.0)); texcoord0 = vec2(vtx.attributes[2].x, vtx.attributes[2].y); texcoord1 = vec2(vtx.attributes[3].x, vtx.attributes[3].y); texcoord0_w = 0.0; view = vec3(0.0, 0.0, 0.0); texcoord2 = vec2(vtx.attributes[4].x, vtx.attributes[4].y); EmitVertex(); } bool AreQuaternionsOpposite(vec4 qa, vec4 qb) { return (dot(qa, qb) < 0.0); } void EmitPrim(Vertex vtx0, Vertex vtx1, Vertex vtx2) { EmitVtx(vtx0, false); EmitVtx(vtx1, AreQuaternionsOpposite(GetVertexQuaternion(vtx0), GetVertexQuaternion(vtx1))); EmitVtx(vtx2, AreQuaternionsOpposite(GetVertexQuaternion(vtx0), GetVertexQuaternion(vtx2))); EndPrimitive(); } void main() { Vertex prim_buffer[3]; prim_buffer[0].attributes = vec4[5](vs_out_attr0[0], vs_out_attr1[0], vs_out_attr2[0], vs_out_attr3[0], vs_out_attr4[0]); prim_buffer[1].attributes = vec4[5](vs_out_attr0[1], vs_out_attr1[1], vs_out_attr2[1], vs_out_attr3[1], vs_out_attr4[1]); prim_buffer[2].attributes = vec4[5](vs_out_attr0[2], vs_out_attr1[2], vs_out_attr2[2], vs_out_attr3[2], vs_out_attr4[2]); EmitPrim(prim_buffer[0], prim_buffer[1], prim_buffer[2]); } [libretro ERROR] Render.OpenGL @ video_core/renderer_opengl/gl_shader_util.cpp:LoadProgram:101: Error linking shader: error: linking with uncompiled/unspecialized shader [libretro ERROR] Debug @ video_core/renderer_opengl/gl_shader_util.cpp:operator():105: Assertion Failed! Shader not linked Segmentation fault
-
You're mixing the versions of different technologies. OpenGL version != OpenGLES version != OpenGL OpenGL Shading Language (GLSL) version.
Regardless, your error is related to the compilation of a shader, which requires GLSL 3.3, thus OpenGL 3.3 (not GLES). You've forced MESA to report an OpenGL 3.3 version, but that doesn't mean the GPU supports it - in fact the Mali G610 supports up to OpenGL ES 3.2 - and you may be bumping into a hardware and driver limitation.
Any reason you're not trying with the recent Panthor GPU driver for RK3588 ? You'll need a recent kernel (6.8 at least) and recent Mesa, but you'd be using the upstream Mesa and Linux kernel code, withput Panfork.
-
Ah yeah you're right - it is a compatibility version after all.
I will definitely give panthor a go eventually, just need to migrate everything over. The reason I'm using panfork is because the mali blobs dont work with panthor at the moment because the kernel driver is different. Mali is more performant than Panthor/Panfork in PS2/Gamecube by a long mile.
I did try downloading the standalone version of citra and running the sdl2-config version (i.e no qt GUI) but I didnt have much luck. I thought it may work because Android citra only officially requires OpenGLES 3.2 support. Oh well.
retrolite@retro-lite-cm5:/usr/local/bin$ MESA_GL_VERSION_OVERRIDE=4.3 MESA_GLSL_VERSION_OVERRIDE=430 malirunW ./citra /media/retrolite/CM5Handheld/roms/3ds/Mario.3ds Running ./citra on Wayland with libmali [ 0.000300] Config <Info> citra/config.cpp:LoadINI:46: Successfully loaded /home/retrolite/.config/citra-emu/sdl2-config.ini Couldn't open plugin directory: No such file or directory No plugins found, falling back on no decorations [ 0.340817] Input <Info> input_common/udp/client.cpp:StartCommunication:206: Starting communication with UDP input server on 127.0.0.1:26760 arm_release_ver of this libmali is 'g6p0-01eac0', rk_so_ver is '6'. [ 0.382169] Frontend <Info> citra/citra.cpp:main:402: Citra Version: 1e2be72 | master-1e2be72e5 [ 0.382176] Config <Info> common/settings.cpp:LogSettings:83: Citra Configuration: [ 0.382178] Config <Info> common/settings.cpp:operator():80: Core_UseCpuJit: true [ 0.382181] Config <Info> common/settings.cpp:operator():80: Core_CPUClockPercentage: 100 [ 0.382182] Config <Info> common/settings.cpp:operator():80: Renderer_UseGLES: true [ 0.382185] Config <Info> common/settings.cpp:operator():80: Renderer_GraphicsAPI: OpenGL [ 0.382186] Config <Info> common/settings.cpp:operator():80: Renderer_AsyncShaders: false [ 0.382188] Config <Info> common/settings.cpp:operator():80: Renderer_AsyncPresentation: true [ 0.382189] Config <Info> common/settings.cpp:operator():80: Renderer_SpirvShaderGen: true [ 0.382191] Config <Info> common/settings.cpp:operator():80: Renderer_Debug: false [ 0.382192] Config <Info> common/settings.cpp:operator():80: Renderer_UseHwShader: true [ 0.382193] Config <Info> common/settings.cpp:operator():80: Renderer_ShadersAccurateMul: false [ 0.382194] Config <Info> common/settings.cpp:operator():80: Renderer_UseShaderJit: false [ 0.382196] Config <Info> common/settings.cpp:operator():80: Renderer_UseResolutionFactor: 1 [ 0.382198] Config <Info> common/settings.cpp:operator():80: Renderer_FrameLimit: 100 [ 0.382199] Config <Info> common/settings.cpp:operator():80: Renderer_VSyncNew: true [ 0.382201] Config <Info> common/settings.cpp:operator():80: Renderer_PostProcessingShader: none (builtin) [ 0.382203] Config <Info> common/settings.cpp:operator():80: Renderer_FilterMode: true [ 0.382204] Config <Info> common/settings.cpp:operator():80: Renderer_TextureFilter: None [ 0.382206] Config <Info> common/settings.cpp:operator():80: Renderer_TextureSampling: GameControlled [ 0.382209] Config <Info> common/settings.cpp:operator():80: Stereoscopy_Render3d: 0 [ 0.382211] Config <Info> common/settings.cpp:operator():80: Stereoscopy_Factor3d: 0 [ 0.382212] Config <Info> common/settings.cpp:operator():80: Stereoscopy_MonoRenderOption: 0 [ 0.382213] Config <Info> common/settings.cpp:operator():80: Layout_LayoutOption: 2 [ 0.382215] Config <Info> common/settings.cpp:operator():80: Layout_SwapScreen: false [ 0.382216] Config <Info> common/settings.cpp:operator():80: Layout_UprightScreen: false [ 0.382220] Config <Info> common/settings.cpp:operator():80: Layout_LargeScreenProportion: 4 [ 0.382221] Config <Info> common/settings.cpp:operator():80: Utility_DumpTextures: false [ 0.382222] Config <Info> common/settings.cpp:operator():80: Utility_CustomTextures: false [ 0.382222] Config <Info> common/settings.cpp:operator():80: Utility_PreloadTextures: false [ 0.382223] Config <Info> common/settings.cpp:operator():80: Utility_AsyncCustomLoading: true [ 0.382224] Config <Info> common/settings.cpp:operator():80: Utility_UseDiskShaderCache: false [ 0.382225] Config <Info> common/settings.cpp:operator():80: Audio_Emulation: HLE [ 0.382226] Config <Info> common/settings.cpp:operator():80: Audio_OutputType: 2 [ 0.382227] Config <Info> common/settings.cpp:operator():80: Audio_OutputDevice: auto [ 0.382228] Config <Info> common/settings.cpp:operator():80: Audio_InputType: 0 [ 0.382229] Config <Info> common/settings.cpp:operator():80: Audio_InputDevice: auto [ 0.382231] Config <Info> common/settings.cpp:operator():80: Audio_EnableAudioStretching: true [ 0.382232] Config <Info> common/settings.cpp:operator():80: Camera_OuterRightName: blank [ 0.382232] Config <Info> common/settings.cpp:operator():80: Camera_OuterRightConfig: [ 0.382233] Config <Info> common/settings.cpp:operator():80: Camera_OuterRightFlip: 0 [ 0.382234] Config <Info> common/settings.cpp:operator():80: Camera_InnerName: blank [ 0.382234] Config <Info> common/settings.cpp:operator():80: Camera_InnerConfig: [ 0.382235] Config <Info> common/settings.cpp:operator():80: Camera_InnerFlip: 0 [ 0.382236] Config <Info> common/settings.cpp:operator():80: Camera_OuterLeftName: blank [ 0.382236] Config <Info> common/settings.cpp:operator():80: Camera_OuterLeftConfig: [ 0.382238] Config <Info> common/settings.cpp:operator():80: Camera_OuterLeftFlip: 0 [ 0.382239] Config <Info> common/settings.cpp:operator():80: DataStorage_UseVirtualSd: true [ 0.382239] Config <Info> common/settings.cpp:operator():80: DataStorage_UseCustomStorage: false [ 0.382241] Config <Info> common/settings.cpp:operator():80: System_IsNew3ds: true [ 0.382242] Config <Info> common/settings.cpp:operator():80: System_LLEApplets: false [ 0.382243] Config <Info> common/settings.cpp:operator():80: System_RegionValue: -1 [ 0.382243] Config <Info> common/settings.cpp:operator():80: System_PluginLoader: false [ 0.382244] Config <Info> common/settings.cpp:operator():80: System_PluginLoaderAllowed: true [ 0.382245] Config <Info> common/settings.cpp:operator():80: Debugging_DelayStartForLLEModules: true [ 0.382245] Config <Info> common/settings.cpp:operator():80: Debugging_UseGdbstub: false [ 0.382246] Config <Info> common/settings.cpp:operator():80: Debugging_GdbstubPort: 24689 [ 0.651842] Audio.DSP <Info> audio_core/hle/aac_decoder.cpp:AACDecoder:27: Created FAAD2 AAC decoder. [ 0.662619] Audio.Sink <Info> audio_core/cubeb_sink.cpp:StateCallback:135: Cubeb Audio Stream Started [ 0.662641] RPC_Server <Info> core/rpc/rpc_server.cpp:RPCServer:14: Starting RPC server. [ 0.662927] RPC_Server <Info> core/rpc/rpc_server.cpp:HandleRequestsLoop:104: Request handler started. [ 0.664328] Service.HTTP <Error> core/hle/service/http/http_c.cpp:DecryptClCertA:1975: ClCertA file missing [ 0.664442] Render.OpenGL <Info> video_core/renderer_opengl/gl_driver.cpp:ReportDriverInfo:133: GL_VERSION: OpenGL ES 3.2 v1.g6p0-01eac0.ba52c908d926792b8f5fe28f383a2b03 [ 0.664444] Render.OpenGL <Info> video_core/renderer_opengl/gl_driver.cpp:ReportDriverInfo:134: GL_VENDOR: ARM [ 0.664445] Render.OpenGL <Info> video_core/renderer_opengl/gl_driver.cpp:ReportDriverInfo:135: GL_RENDERER: Mali-LODX [ 1.504010] Render.OpenGL <Info> video_core/renderer_opengl/gl_blit_helper.cpp:BlitHelper:75: Texture views are unsupported, reinterpretation will do intermediate copy [ 1.513656] Loader <Info> core/loader/ncch.cpp:Load:270: Program ID: 000400000007AE00 [ 1.513705] Service.FS <Warning> core/file_sys/ncch_container.cpp:OpenFile:126: Failed to open /home/retrolite/.local/share/citra-emu/sdmc/Nintendo 3DS/00000000000000000000000000000000/00000000000000000000000000000000/title/0004000e/0007ae00/content/00000000.app [ 1.571495] Loader <Info> core/hle/kernel/process.cpp:ParseKernelCaps:196: ExHeader kernel version: 2.32 [ 1.572938] Service.FS <Info> core/file_sys/ncch_container.cpp:LoadSectionExeFS:506: Attempting to load logo from the ExeFS [ 1.600878] Frontend <Warning> common/linux/gamemode.cpp:StartGamemode:15: Failed to start gamemode: dlopen failed - libgamemode.so: cannot open shared object file: No such file or directory [ 2.140401] Service.SRV <Warning> core/hle/service/sm/srv.cpp:RegisterClient:63: (STUBBED) called. Caller PID=11 [ 2.140690] Service.SRV <Warning> core/hle/service/sm/srv.cpp:EnableNotification:85: (STUBBED) called [ 2.147424] Service.NDM <Warning> core/hle/service/ndm/ndm_u.cpp:OverrideDefaultDaemons:186: (STUBBED) bit_mask=0x0000000F [ 2.148340] Service.NDM <Warning> core/hle/service/ndm/ndm_u.cpp:SuspendDaemons:74: (STUBBED) bit_mask=0x00000006 [ 2.160986] Service.FS <Warning> core/hle/service/fs/fs_user.cpp:InitializeWithSdkVersion:1062: (STUBBED) called, version: 0x040100C8 [ 2.161837] Service.FS <Error> ./core/file_sys/archive_backend.h:GetOpenDelayNs:209: Delay generator was not initalized. Using default [ 2.208175] Service.FS <Error> ./core/file_sys/archive_backend.h:GetOpenDelayNs:209: Delay generator was not initalized. Using default [ 2.265163] Service.CFG <Info> core/hle/service/cfg/cfg.cpp:UpdatePreferredRegionCode:797: Preferred region code set to 1 [ 2.288698] Service.FS <Error> core/file_sys/savedata_archive.cpp:OpenDirectory:343: Unexpected file in path /home/retrolite/.local/share/citra-emu/sdmc/Nintendo 3DS/00000000000000000000000000000000/00000000000000000000000000000000/title/00040000/0007ae00/data/00000001/BigRedSave.dat [ 2.290118] Service.FS <Error> ./core/file_sys/archive_backend.h:GetOpenDelayNs:209: Delay generator was not initalized. Using default [ 2.319132] Service.FS <Error> core/file_sys/savedata_archive.cpp:OpenFile:75: Non-existing file /home/retrolite/.local/share/citra-emu/nand/data/00000000000000000000000000000000/sysdata/00010034/00000000/BOSS_SV.db can't be open without mode create. [ 2.319145] Service.FS <Error> core/file_sys/savedata_archive.cpp:OpenFile:75: Non-existing file /home/retrolite/.local/share/citra-emu/nand/data/00000000000000000000000000000000/sysdata/00010034/00000000/BOSS_SS.db can't be open without mode create. [ 2.319147] Service.BOSS <Error> core/hle/service/boss/online_service.cpp:InitializeSession:104: Could not open BOSS database. [ 2.319917] Service <Error> core/hle/service/service.cpp:ReportUnimplementedFunction:168: unknown / unimplemented function 'Initialize': port='nim:aoc' cmd_buf={[0]=0x210000 (0x0021, 0, 0)} [ 3.059720] Service.APT <Warning> core/hle/service/apt/apt.cpp:NotifyToWait:338: (STUBBED) app_id=768 [ 3.062647] Service.APT <Warning> core/hle/service/apt/apt.cpp:AppletUtility:687: (STUBBED) called command=0X00000007, input_size=0X00000004, output_size=0X00000001 [ 3.063026] Service.APT <Warning> core/hle/service/apt/apt.cpp:AppletUtility:687: (STUBBED) called command=0X00000004, input_size=0X00000001, output_size=0X00000001 [ 3.208259] Service.FS <Error> ./core/file_sys/archive_backend.h:GetOpenDelayNs:209: Delay generator was not initalized. Using default [ 3.208303] Service.FS <Warning> core/file_sys/archive_ncch.cpp:OpenFile:146: Mii data file missing. Loading open source replacement from memory [ 3.268403] Service.SRV <Warning> core/hle/service/sm/srv.cpp:Subscribe:212: (STUBBED) called, notification_id=0x209 [ 3.268611] Service.SRV <Warning> core/hle/service/sm/srv.cpp:Subscribe:212: (STUBBED) called, notification_id=0x207 [ 3.466954] Service.APT <Warning> core/hle/service/apt/apt.cpp:SetAppCpuTimeLimit:710: (STUBBED) called, must_be_one=1, value=30 [ 3.468328] Service.DSP <Info> audio_core/hle/hle.cpp:LoadComponent:459: Firmware hash: 0x3318473a60c8e953 [ 3.468333] Service.DSP <Info> audio_core/hle/hle.cpp:LoadComponent:463: Structures hash: 0x228655de1258d999 [ 3.468335] Service.DSP <Info> core/hle/service/dsp/dsp_dsp.cpp:LoadComponent:191: called size=0xC20A, prog_mask=0x00FF, data_mask=0x00FF [ 3.469027] Service.DSP <Info> core/hle/service/dsp/dsp_dsp.cpp:RegisterInterruptEvents:258: Registered interrupt=2, channel=2, event=event-0015ae48 [ 3.469318] Service.DSP <Warning> core/hle/service/dsp/dsp_dsp.cpp:GetSemaphoreEventHandle:275: (STUBBED) called [ 3.469581] Service.DSP <Warning> core/hle/service/dsp/dsp_dsp.cpp:SetSemaphoreMask:285: (STUBBED) called mask=0x2000 [ 3.469979] Audio.DSP <Info> audio_core/hle/hle.cpp:PipeWrite:224: Application has requested initialization of DSP hardware [ 3.470158] Service.DSP <Info> core/hle/service/dsp/dsp_dsp.cpp:SetSemaphore:57: called, semaphore_value=4000 [ 3.471772] Service.DSP <Info> core/hle/service/dsp/dsp_dsp.cpp:SetSemaphore:57: called, semaphore_value=4000 [ 3.507926] Service.APT <Warning> core/hle/service/apt/apt.cpp:AppletUtility:687: (STUBBED) called command=0X00000004, input_size=0X00000001, output_size=0X00000001 [ 4.139077] Service.FS <Warning> core/file_sys/archive_ncch.cpp:OpenFile:156: Shared Font file missing. Loading open source replacement from memory [ 4.306572] Service.FS <Error> ./core/file_sys/archive_backend.h:GetOpenDelayNs:209: Delay generator was not initalized. Using default [ 4.306798] Service.FS <Error> ./core/file_sys/file_backend.h:GetReadDelayNs:51: Delay generator was not initalized. Using default [ 4.307488] Service.FS <Error> ./core/file_sys/archive_backend.h:GetOpenDelayNs:209: Delay generator was not initalized. Using default [ 4.330600] Service.FS <Error> ./core/file_sys/file_backend.h:GetReadDelayNs:51: Delay generator was not initalized. Using default [ 4.331206] Service.NDM <Warning> core/hle/service/ndm/ndm_u.cpp:SuspendDaemons:74: (STUBBED) bit_mask=0x00000001 [ 4.384387] Service.FS <Error> core/file_sys/savedata_archive.cpp:OpenFile:67: Path not found /home/retrolite/.local/share/citra-emu/nand/data/00000000000000000000000000000000/sysdata/00010026/00000000/CEC/0007ad00/MBoxInfo____ [ 4.385554] Service.NDM <Warning> core/hle/service/ndm/ndm_u.cpp:ResumeDaemons:89: (STUBBED) bit_mask=0x00000001 [ 4.387664] Service.FS <Error> core/file_sys/savedata_archive.cpp:OpenDirectory:343: Unexpected file in path /home/retrolite/.local/share/citra-emu/sdmc/Nintendo 3DS/00000000000000000000000000000000/00000000000000000000000000000000/title/00040000/0007ae00/data/00000001/BigRedSave.dat [ 4.391908] Service.FS <Warning> ./core/file_sys/archive_backend.h:Control:198: (STUBBED) called, archive=SaveDataArchive: /home/retrolite/.local/share/citra-emu/sdmc/Nintendo 3DS/00000000000000000000000000000000/00000000000000000000000000000000/title/00040000/0007ae00/data/00000001/, action=00000000, input_size=00000001, output_size=00000001 [ 7.066372] Service.FS <Warning> core/hle/service/fs/file.cpp:OpenLinkFile:376: (STUBBED) File command OpenLinkFile Path: [Binary: 000000000000000000000000] Unhandled SIGSEGV at pc 0x0000ffffa5af7b84 /usr/sbin/malirunW: line 14: 3663 Segmentation fault './citra' '/media/retrolite/CM5Handheld/roms/3ds/Mario.3ds'
malirunW looks something like this:
#!/bin/bash APP=$(which $1) ARGS=${@:2} HASRPATH=$(chrpath -l $APP | grep -o /usr/lib) export LIBGL_DEEPBIND=0 export LD_LIBRARY_PATH="/usr/lib/gl4es:/usr/lib/libmali/wayland:$LD_LIBRARY_PATH" # linux linker loads the shared libs in the order of 1. RPATH of the elf, then LD_LIBRARY_PATH # if a binary has RPATH pointed out to /usr/lib, then this causes system GL libraries to load # in such a case we load the app directly with linker ommitting the rpath of /usr/lib echo $HASRPATH if [ -z $HASRPATH ] then echo "Running ${APP} on Wayland with libmali" eval "${@@Q}" else echo "Running ${APP} on Wayland with libmali using linker" eval "/lib/ld-linux-aarch64.so.1 --inhibit-rpath :/usr/lib ${@@Q}" fi
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.