diff --git a/app_solcraftlauncher/src/main/java/net/kdt/pojavlaunch/utils/JREUtils.java b/app_solcraftlauncher/src/main/java/net/kdt/pojavlaunch/utils/JREUtils.java index a145609b10..410bbb3161 100644 --- a/app_solcraftlauncher/src/main/java/net/kdt/pojavlaunch/utils/JREUtils.java +++ b/app_solcraftlauncher/src/main/java/net/kdt/pojavlaunch/utils/JREUtils.java @@ -452,6 +452,7 @@ public static String loadGraphicsLibrary(){ case "opengles3": renderLibrary = "libgl4es_114.so"; break; case "vulkan_zink": renderLibrary = "libOSMesa.so"; break; + case "mesa_zink": renderLibrary = "libOSMesa_.so"; break case "opengles3_desktopgl_angle_vulkan" : renderLibrary = "libtinywrapper.so"; break; default: Log.w("RENDER_LIBRARY", "No renderer selected, defaulting to opengles2"); @@ -459,6 +460,11 @@ public static String loadGraphicsLibrary(){ break; } + + if (LOCAL_RENDERER) + if (LOCAL_RENDERER.contains("mesa")) + renderLibrary = "libOSMesa_.so"; + if (!dlopen(renderLibrary) && !dlopen(findInLdLibPath(renderLibrary))) { Log.e("RENDER_LIBRARY","Failed to load renderer " + renderLibrary + ". Falling back to GL4ES 1.1.4"); LOCAL_RENDERER = "opengles2"; diff --git a/app_solcraftlauncher/src/main/jni/egl_bridge.c b/app_solcraftlauncher/src/main/jni/egl_bridge.c index 029bdeff3e..6be05425a1 100644 --- a/app_solcraftlauncher/src/main/jni/egl_bridge.c +++ b/app_solcraftlauncher/src/main/jni/egl_bridge.c @@ -200,9 +200,10 @@ int pojavInitOpenGL() { if (strncmp("opengles", renderer, 8) == 0) { pojav_environ->config_renderer = RENDERER_GL4ES; set_gl_bridge_tbl(); - } else if (strcmp(renderer, "vulkan_zink") == 0) { + } else if (strcmp(renderer, "vulkan_zink") == 0 || strncmp("mesa", renderer, 4) == 0) { pojav_environ->config_renderer = RENDERER_VK_ZINK; load_vulkan(); + setenv("MESA_LOADER_DRIVER_OVERRIDE","zink",1); setenv("GALLIUM_DRIVER","zink",1); set_osm_bridge_tbl(); } diff --git a/app_solcraftlauncher/src/main/jniLibs/arm64-v8a/libOSMesa_.so b/app_solcraftlauncher/src/main/jniLibs/arm64-v8a/libOSMesa_.so new file mode 100644 index 0000000000..fdf40501ee Binary files /dev/null and b/app_solcraftlauncher/src/main/jniLibs/arm64-v8a/libOSMesa_.so differ diff --git a/app_solcraftlauncher/src/main/jniLibs/arm64-v8a/libvulkan_freedreno.so b/app_solcraftlauncher/src/main/jniLibs/arm64-v8a/libvulkan_freedreno.so old mode 100755 new mode 100644 index db1fb4fb29..c92df9021f Binary files a/app_solcraftlauncher/src/main/jniLibs/arm64-v8a/libvulkan_freedreno.so and b/app_solcraftlauncher/src/main/jniLibs/arm64-v8a/libvulkan_freedreno.so differ diff --git a/app_solcraftlauncher/src/main/res/values/headings_array.xml b/app_solcraftlauncher/src/main/res/values/headings_array.xml index 4aeec2565d..770facb0b2 100644 --- a/app_solcraftlauncher/src/main/res/values/headings_array.xml +++ b/app_solcraftlauncher/src/main/res/values/headings_array.xml @@ -4,6 +4,15 @@ @string/mcl_setting_renderer_gles2_4 @string/mcl_setting_renderer_vulkan_zink @string/mcl_setting_renderer_angle + @string/mcl_setting_renderer_mesa_zink + + @string/mcl_setting_renderer_mesa + + + + @string/mcl_setting_renderer_mesa_zink + @string/mcl_setting_renderer_mesa_freedreno + @string/mcl_setting_renderer_mesa_swrast @@ -39,6 +48,16 @@ opengles2 vulkan_zink opengles3_desktopgl_angle_vulkan + + mesa_zink + mesa + + + freedreno + zink + swrast + virgl + panfrost @string/global_default diff --git a/app_solcraftlauncher/src/main/res/values/strings.xml b/app_solcraftlauncher/src/main/res/values/strings.xml index fbf30ce4d3..5312e79691 100644 --- a/app_solcraftlauncher/src/main/res/values/strings.xml +++ b/app_solcraftlauncher/src/main/res/values/strings.xml @@ -67,6 +67,17 @@ Holy GL4ES - (all versions, fast) Zink (Vulkan) - (all versions, mid) ANGLE (Vulkan) - (1.17+ only, mid) + Mesa OpenGL renderers + + 23.0.4 + 24.1.0 + + zink + freedreno + virgl + swrast + panfrost + Release Snapshot Old-alpha