test for amd64 or panfrost+vulkan only parallel64
This commit is contained in:
parent
68edba2fdb
commit
af3458766b
4 changed files with 19 additions and 122 deletions
|
@ -1,112 +0,0 @@
|
|||
diff --git a/src/api/api_export.ver b/src/api/api_export.ver
|
||||
index 74512429..9550d6a7 100644
|
||||
--- a/src/api/api_export.ver
|
||||
+++ b/src/api/api_export.ver
|
||||
@@ -78,4 +78,6 @@ VidExt_SetVideoModeWithRate;
|
||||
VidExt_ToggleFullScreen;
|
||||
VidExt_ResizeWindow;
|
||||
VidExt_GL_GetDefaultFramebuffer;
|
||||
+VidExt_GetVkSurface;
|
||||
+VidExt_GetVkInstExtensions;
|
||||
local: *; };
|
||||
diff --git a/src/api/m64p_types.h b/src/api/m64p_types.h
|
||||
index dd951070..44bd543f 100644
|
||||
--- a/src/api/m64p_types.h
|
||||
+++ b/src/api/m64p_types.h
|
||||
@@ -447,6 +447,8 @@ typedef struct {
|
||||
m64p_error (*VidExtFuncToggleFS)(void);
|
||||
m64p_error (*VidExtFuncResizeWindow)(int, int);
|
||||
uint32_t (*VidExtFuncGLGetDefaultFramebuffer)(void);
|
||||
+ void* (*VidExtFuncGetVkSurface)(void*);
|
||||
+ m64p_error (*VidExtFuncGetVkInstExtensions)(const char**[], uint32_t*);
|
||||
} m64p_video_extension_functions;
|
||||
|
||||
#endif /* define M64P_TYPES_H */
|
||||
diff --git a/src/api/m64p_vidext.h b/src/api/m64p_vidext.h
|
||||
index abc930bd..3df71e39 100644
|
||||
--- a/src/api/m64p_vidext.h
|
||||
+++ b/src/api/m64p_vidext.h
|
||||
@@ -181,6 +181,24 @@ typedef uint32_t (*ptr_VidExt_GL_GetDefaultFramebuffer)(void);
|
||||
EXPORT uint32_t CALL VidExt_GL_GetDefaultFramebuffer(void);
|
||||
#endif
|
||||
|
||||
+/* VidExt_GetVkSurface()
|
||||
+ *
|
||||
+ * Returns the VkSurfaceKHR handle which points to the rendering surface.
|
||||
+ */
|
||||
+typedef void* (*ptr_VidExt_GetVkSurface)(void*);
|
||||
+#if defined(M64P_CORE_PROTOTYPES)
|
||||
+EXPORT void* CALL VidExt_GetVkSurface(void*);
|
||||
+#endif
|
||||
+
|
||||
+/* VidExt_GetVkInstExtensions()
|
||||
+ *
|
||||
+ * Returns a list of supported Vulkan instance extensions.
|
||||
+ */
|
||||
+typedef m64p_error (*ptr_VidExt_GetVkInstExtensions)(const char**[], uint32_t*);
|
||||
+#if defined(M64P_CORE_PROTOTYPES)
|
||||
+EXPORT m64p_error CALL VidExt_GetVkInstExtensions(const char**[], uint32_t*);
|
||||
+#endif
|
||||
+
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
diff --git a/src/api/vidext.c b/src/api/vidext.c
|
||||
index 545ea75c..e96e6759 100644
|
||||
--- a/src/api/vidext.c
|
||||
+++ b/src/api/vidext.c
|
||||
@@ -43,7 +43,7 @@
|
||||
#endif
|
||||
|
||||
/* local variables */
|
||||
-static m64p_video_extension_functions l_ExternalVideoFuncTable = {14, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL};
|
||||
+static m64p_video_extension_functions l_ExternalVideoFuncTable = {16, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL};
|
||||
static int l_VideoExtensionActive = 0;
|
||||
static int l_VideoOutputActive = 0;
|
||||
static int l_Fullscreen = 0;
|
||||
@@ -56,7 +56,7 @@ m64p_error OverrideVideoFunctions(m64p_video_extension_functions *VideoFunctionS
|
||||
/* check input data */
|
||||
if (VideoFunctionStruct == NULL)
|
||||
return M64ERR_INPUT_ASSERT;
|
||||
- if (VideoFunctionStruct->Functions < 14)
|
||||
+ if (VideoFunctionStruct->Functions < 16)
|
||||
return M64ERR_INPUT_INVALID;
|
||||
|
||||
/* disable video extension if any of the function pointers are NULL */
|
||||
@@ -73,10 +73,12 @@ m64p_error OverrideVideoFunctions(m64p_video_extension_functions *VideoFunctionS
|
||||
VideoFunctionStruct->VidExtFuncSetCaption == NULL ||
|
||||
VideoFunctionStruct->VidExtFuncToggleFS == NULL ||
|
||||
VideoFunctionStruct->VidExtFuncResizeWindow == NULL ||
|
||||
- VideoFunctionStruct->VidExtFuncGLGetDefaultFramebuffer == NULL)
|
||||
+ VideoFunctionStruct->VidExtFuncGLGetDefaultFramebuffer == NULL ||
|
||||
+ VideoFunctionStruct->VidExtFuncGetVkSurface == NULL ||
|
||||
+ VideoFunctionStruct->VidExtFuncGetVkInstExtensions == NULL)
|
||||
{
|
||||
- l_ExternalVideoFuncTable.Functions = 14;
|
||||
- memset(&l_ExternalVideoFuncTable.VidExtFuncInit, 0, 14 * sizeof(void *));
|
||||
+ l_ExternalVideoFuncTable.Functions = 16;
|
||||
+ memset(&l_ExternalVideoFuncTable.VidExtFuncInit, 0, 16 * sizeof(void *));
|
||||
l_VideoExtensionActive = 0;
|
||||
return M64ERR_SUCCESS;
|
||||
}
|
||||
@@ -706,3 +708,19 @@ EXPORT uint32_t CALL VidExt_GL_GetDefaultFramebuffer(void)
|
||||
|
||||
return 0;
|
||||
}
|
||||
+
|
||||
+EXPORT void* CALL VidExt_GetVkSurface(void* instance)
|
||||
+{
|
||||
+ if (l_VideoExtensionActive)
|
||||
+ return (*l_ExternalVideoFuncTable.VidExtFuncGetVkSurface)(instance);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+EXPORT m64p_error CALL VidExt_GetVkInstExtensions(const char** ext[], uint32_t* ext_num)
|
||||
+{
|
||||
+ if (l_VideoExtensionActive)
|
||||
+ return (*l_ExternalVideoFuncTable.VidExtFuncGetVkInstExtensions)(ext, ext_num);
|
||||
+
|
||||
+ return M64ERR_INPUT_INVALID;
|
||||
+}
|
||||
\ No newline at end of file
|
|
@ -105,13 +105,17 @@ fi
|
|||
# Show FPS
|
||||
# Get configuration from system.cfg
|
||||
if [ "${FPS}" = "true" ]; then
|
||||
sed -i '/ShowFPS = (False|True)/c\ShowFPS = True' $TMP/mupen64plus.cfg
|
||||
sed -i '/ShowFPS = (0|1)/c\ShowFPS = 1' $TMP/mupen64plus.cfg
|
||||
sed -i '/show_fps/c\show_fps = 1' $TMP/mupen64plus.cfg
|
||||
export LIBGL_SHOW_FPS="1"
|
||||
export GALLIUM_HUD="cpu+GPU-load+fps"
|
||||
# sed -i '/ShowFPS = (False|True)/c\ShowFPS = True' $TMP/mupen64plus.cfg
|
||||
# sed -i '/ShowFPS = (0|1)/c\ShowFPS = 1' $TMP/mupen64plus.cfg
|
||||
# sed -i '/show_fps/c\show_fps = 1' $TMP/mupen64plus.cfg
|
||||
else
|
||||
sed -i '/ShowFPS = (False|True)/c\ShowFPS = False' $TMP/mupen64plus.cfg
|
||||
sed -i '/ShowFPS = (0|1)/c\ShowFPS = 0' $TMP/mupen64plus.cfg
|
||||
sed -i '/show_fps/c\show_fps = 0' $TMP/mupen64plus.cfg
|
||||
export LIBGL_SHOW_FPS="0"
|
||||
export GALLIUM_HUD="off"
|
||||
# sed -i '/ShowFPS = (False|True)/c\ShowFPS = False' $TMP/mupen64plus.cfg
|
||||
# sed -i '/ShowFPS = (0|1)/c\ShowFPS = 0' $TMP/mupen64plus.cfg
|
||||
# sed -i '/show_fps/c\show_fps = 0' $TMP/mupen64plus.cfg
|
||||
fi
|
||||
|
||||
# SIMPLECORE, decide which executable to use for simple64
|
||||
|
@ -146,6 +150,11 @@ esac
|
|||
# Set the RSP plugin
|
||||
case "${RSP}" in
|
||||
"parallel")
|
||||
export LIBGL_ALWAYS_SOFTWARE="1"
|
||||
export MESA_GLSL_CACHE_DISABLE="1"
|
||||
export MESA_GL_VERSION_OVERRIDE="3.3COMPAT"
|
||||
export MESA_GLSL_VERSION_OVERRIDE="330"
|
||||
export MESA_EXTENSION_OVERRIDE="-GL_ARB_buffer_storage"
|
||||
SET_PARAMS="$SET_PARAMS --rsp mupen64plus-rsp-parallel$SIMPLESUFFIX.so"
|
||||
;;
|
||||
"cxd4")
|
||||
|
|
|
@ -27,11 +27,11 @@ make_target() {
|
|||
APIDIR=${SYSROOT_PREFIX}/usr/local/include/mupen64plus
|
||||
cmake -G Ninja -DAPIDIR=${APIDIR} -DCMAKE_BUILD_TYPE="Release" ..
|
||||
VERBOSE=1 cmake --build .
|
||||
cp ${PKG_BUILD}/build/simple64-rsp-parallel.so ${PKG_BUILD}/build/mupen64plus-rsp-parallel-base.so
|
||||
cp ${PKG_BUILD}/build/mupen64plus-rsp-parallel.so ${PKG_BUILD}/build/mupen64plus-rsp-parallel-base.so
|
||||
APIDIR=${SYSROOT_PREFIX}/usr/local/include/simple64
|
||||
cmake -G Ninja -DAPIDIR=${APIDIR} -DCMAKE_BUILD_TYPE="Release" ..
|
||||
VERBOSE=1 cmake --build .
|
||||
cp ${PKG_BUILD}/build/simple64-rsp-parallel.so ${PKG_BUILD}/build/mupen64plus-rsp-parallel-simple.so
|
||||
cp ${PKG_BUILD}/build/mupen64plus-rsp-parallel.so ${PKG_BUILD}/build/mupen64plus-rsp-parallel-simple.so
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
|
|
|
@ -32,11 +32,11 @@ make_target() {
|
|||
APIDIR=${SYSROOT_PREFIX}/usr/local/include/mupen64plus
|
||||
cmake -G Ninja -DAPIDIR=${APIDIR} -DCMAKE_BUILD_TYPE="Release" ..
|
||||
VERBOSE=1 cmake --build .
|
||||
cp ${PKG_BUILD}/build/simple64-video-parallel.so ${PKG_BUILD}/build/mupen64plus-video-parallel-base.so
|
||||
cp ${PKG_BUILD}/build/mupen64plus-video-parallel.so ${PKG_BUILD}/build/mupen64plus-video-parallel-base.so
|
||||
APIDIR=${SYSROOT_PREFIX}/usr/local/include/simple64
|
||||
cmake -G Ninja -DAPIDIR=${APIDIR} -DCMAKE_BUILD_TYPE="Release" ..
|
||||
VERBOSE=1 cmake --build .
|
||||
cp ${PKG_BUILD}/build/simple64-video-parallel.so ${PKG_BUILD}/build/mupen64plus-video-parallel-simple.so
|
||||
cp ${PKG_BUILD}/build/mupen64plus-video-parallel.so ${PKG_BUILD}/build/mupen64plus-video-parallel-simple.so
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
|
|
Loading…
Reference in a new issue