Skip to content

Commit

Permalink
Feat[egl_bridge]: simplify ZINK_PREFER_SYSTEM_DRIVER handling
Browse files Browse the repository at this point in the history
  • Loading branch information
artdeell committed Jan 20, 2025
1 parent a9815b2 commit bff49a7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,6 @@ public static void setJavaEnvironment(Activity activity, String jreHome) throws

if(PREF_DUMP_SHADERS)
envMap.put("LIBGL_VGPU_DUMP", "1");
if(PREF_ZINK_PREFER_SYSTEM_DRIVER)
envMap.put("POJAV_ZINK_PREFER_SYSTEM_DRIVER", "1");
if(PREF_VSYNC_IN_ZINK)
envMap.put("POJAV_VSYNC_IN_ZINK", "1");
if(Tools.deviceHasHangingLinker())
Expand Down Expand Up @@ -258,7 +256,7 @@ public static void setJavaEnvironment(Activity activity, String jreHome) throws
}
}

if(info.vendor.equals("Qualcomm") && info.renderer.contains("Adreno")) {
if(info.vendor.equals("Qualcomm") && info.renderer.contains("Adreno") && !PREF_ZINK_PREFER_SYSTEM_DRIVER) {
envMap.put("POJAV_LOAD_TURNIP", "1");
}

Expand Down
3 changes: 1 addition & 2 deletions app_pojavlauncher/src/main/jni/egl_bridge.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,7 @@ static void set_vulkan_ptr(void* ptr) {
}

void load_vulkan() {
if(getenv("POJAV_ZINK_PREFER_SYSTEM_DRIVER") == NULL &&
android_get_device_api_level() >= 28) { // the loader does not support below that
if(android_get_device_api_level() >= 28) { // the loader does not support below that
#ifdef ADRENO_POSSIBLE
void* result = load_turnip_vulkan();
if(result != NULL) {
Expand Down

0 comments on commit bff49a7

Please sign in to comment.