Skip to content

Commit

Permalink
breaking changes
Browse files Browse the repository at this point in the history
add new renderer, mesa strings, etc
  • Loading branch information
SolDev69 committed Apr 26, 2024
1 parent 9ec3ed0 commit 27a1787
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -452,13 +452,19 @@ 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");
renderLibrary = "libgl4es_114.so";
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";
Expand Down
3 changes: 2 additions & 1 deletion app_solcraftlauncher/src/main/jni/egl_bridge.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
Binary file not shown.
Binary file modified app_solcraftlauncher/src/main/jniLibs/arm64-v8a/libvulkan_freedreno.so
100755 → 100644
Binary file not shown.
19 changes: 19 additions & 0 deletions app_solcraftlauncher/src/main/res/values/headings_array.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@
<item name="1">@string/mcl_setting_renderer_gles2_4</item>
<item name="2">@string/mcl_setting_renderer_vulkan_zink</item>
<item name="3">@string/mcl_setting_renderer_angle</item>
<item name="4">@string/mcl_setting_renderer_mesa_zink</item>

<item name="10">@string/mcl_setting_renderer_mesa</item>
</string-array>

<string-array name="mesa_renderers">
<item name="1">@string/mcl_setting_renderer_mesa_zink</item>
<item name="2">@string/mcl_setting_renderer_mesa_freedreno</item>
<item name="3">@string/mcl_setting_renderer_mesa_swrast</item>
</string-array>

<string-array name="menu_customcontrol">
Expand Down Expand Up @@ -39,6 +48,16 @@
<item>opengles2</item> <!-- gl4es_extra 1.1.4 with OpenGL ES 2/"3" -->
<item>vulkan_zink</item> <!-- virglrenderer with OpenGL ES 3 -->
<item>opengles3_desktopgl_angle_vulkan</item>

<item>mesa_zink</item> <!-- temporary renderer -->
<item>mesa</item>
</string-array>
<string-array name="mesa_renderer_values">
<item>freedreno</item>
<item>zink</item>
<item>swrast</item>
<item>virgl</item>
<item>panfrost</item>
</string-array>
<string-array name="download_source_names">
<item>@string/global_default</item>
Expand Down
11 changes: 11 additions & 0 deletions app_solcraftlauncher/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,17 @@
<string name="mcl_setting_renderer_gles2_4">Holy GL4ES - (all versions, fast)</string>
<string name="mcl_setting_renderer_vulkan_zink">Zink (Vulkan) - (all versions, mid)</string>
<string name="mcl_setting_renderer_angle">ANGLE (Vulkan) - (1.17+ only, mid)</string>
<string name="mcl_setting_renderer_mesa">Mesa OpenGL renderers</string>

<string name="mcl_setting_renderer_mesa_2304">23.0.4</string>
<string name="mcl_setting_renderer_mesa_2410">24.1.0</string>

<string name="mcl_setting_renderer_mesa_zink">zink</string>
<string name="mcl_setting_renderer_mesa_freedreno">freedreno</string>
<string name="mcl_setting_renderer_mesa_virgl">virgl</string>
<string name="mcl_setting_renderer_mesa_swrast">swrast</string>
<string name="mcl_setting_renderer_mesa_panfrost">panfrost</string>

<string name="mcl_setting_veroption_release">Release</string>
<string name="mcl_setting_veroption_snapshot">Snapshot</string>
<string name="mcl_setting_veroption_oldalpha">Old-alpha</string>
Expand Down

0 comments on commit 27a1787

Please sign in to comment.