Skip to content

Commit

Permalink
Zink testing
Browse files Browse the repository at this point in the history
  • Loading branch information
The Judge committed Jun 14, 2024
1 parent 7c8db56 commit 5d8f467
Show file tree
Hide file tree
Showing 35 changed files with 474 additions and 50,173 deletions.
7 changes: 6 additions & 1 deletion src/main/java/pojlib/util/JREUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,12 @@ public static void setJavaEnvironment(Activity activity, MinecraftInstances.Inst
envMap.put("HOME", instance.gameDir);
envMap.put("TMPDIR", activity.getCacheDir().getAbsolutePath());
envMap.put("VR_MODEL", API.model);
envMap.put("POJLIB_RENDERER", "regal");
envMap.put("GALLIUM_DRIVER", "zink");
envMap.put("MESA_LOADER_DRIVER_OVERRIDE", "zink");
envMap.put("MESA_LOG_FILE", instance.gameDir + "/mesa.log");
envMap.put("LIBGL_DRIVERS_PATH", activity.getApplicationInfo().nativeLibraryDir);
envMap.put("EGL_PLATFORM", "surfaceless");
envMap.put("POJLIB_RENDERER", "zink");

envMap.put("LD_LIBRARY_PATH", LD_LIBRARY_PATH);
envMap.put("PATH", activity.getFilesDir() + "/runtimes/JRE-22/bin:" + Os.getenv("PATH"));
Expand Down
41 changes: 14 additions & 27 deletions src/main/jni/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,10 @@ HERE_PATH := $(LOCAL_PATH)
LOCAL_PATH := $(HERE_PATH)

include $(CLEAR_VARS)
LOCAL_MODULE := regal
LOCAL_SRC_FILES := GL/libRegal.so
LOCAL_MODULE := libadrenotools
LOCAL_SRC_FILES := adrenotools/libadrenotools.so
include $(PREBUILT_SHARED_LIBRARY)

include $(CLEAR_VARS)
LOCAL_MODULE := spirv-cross
LOCAL_SRC_FILES := tinywrapper/SPIRVCross/libspirv-cross-c-shared.so
include $(PREBUILT_SHARED_LIBRARY)

include $(CLEAR_VARS)
LOCAL_MODULE := shaderc
LOCAL_SRC_FILES := tinywrapper/shaderc/libshaderc_shared.so
include $(PREBUILT_SHARED_LIBRARY)

include $(CLEAR_VARS)
LOCAL_MODULE := tinywrapper
LOCAL_SHARED_LIBRARIES := regal spirv-cross shaderc
LOCAL_LDLIBS := -lGLESv3
LOCAL_SRC_FILES := tinywrapper/main.c tinywrapper/string_utils.c
LOCAL_C_INCLUDES := $(LOCAL_PATH)/tinywrapper
include $(BUILD_SHARED_LIBRARY)


include $(CLEAR_VARS)
LOCAL_MODULE := openxr_loader
LOCAL_SRC_FILES := libopenxr_loader.so
Expand All @@ -54,22 +35,28 @@ LOCAL_SRC_FILES := ./OpenOVR/OCOVR.a
include $(PREBUILT_STATIC_LIBRARY)

include $(CLEAR_VARS)
LOCAL_LDLIBS := -llog -landroid -lGLESv3 -lvulkan -lEGL
LOCAL_CFLAGS := -DXR_USE_PLATFORM_ANDROID -DXR_USE_GRAPHICS_API_OPENGL_ES
LOCAL_LDLIBS := -llog -landroid -lGLESv3 -lvulkan
LOCAL_CFLAGS := -DXR_USE_PLATFORM_ANDROID -DXR_USE_GRAPHICS_API_OPENGL_ES -DGL_GLEXT_PROTOTYPES
LOCAL_SHARED_LIBRARIES := openxr_loader
LOCAL_WHOLE_STATIC_LIBRARIES := ocovr
LOCAL_MODULE := openvr_api
LOCAL_SRC_FILES := \
vloader.cpp
LOCAL_SRC_FILES := \
vloader.cpp
include $(BUILD_SHARED_LIBRARY)

include $(CLEAR_VARS)
LOCAL_MODULE := tinywrapper
LOCAL_SRC_FILES := \
tinywrapper/main.c
include $(BUILD_SHARED_LIBRARY)

include $(CLEAR_VARS)
# Link GLESv2 for test
LOCAL_LDLIBS := -ldl -llog -landroid -lGLESv3 -lEGL
LOCAL_LDLIBS := -ldl -llog -landroid
# -lGLESv2
LOCAL_MODULE := pojavexec
# LOCAL_CFLAGS += -DDEBUG
LOCAL_SHARED_LIBRARIES := openvr_api regal
LOCAL_SHARED_LIBRARIES := libadrenotools
# -DGLES_TEST
LOCAL_SRC_FILES := \
egl_bridge.c \
Expand Down
Loading

0 comments on commit 5d8f467

Please sign in to comment.