Commit 10035f1b authored by Andrew Eikum's avatar Andrew Eikum Committed by Alexandre Julliard

winemac: Implement Vulkan driver on top of MoltenVK.

parent 357017cd
......@@ -15276,12 +15276,68 @@ _ACEOF
fi
if test "x$ac_cv_lib_soname_vulkan" = "x"
then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -lMoltenVK" >&5
$as_echo_n "checking for -lMoltenVK... " >&6; }
if ${ac_cv_lib_soname_MoltenVK+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_soname_save_LIBS=$LIBS
LIBS="-lMoltenVK $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char vkGetInstanceProcAddr ();
int
main ()
{
return vkGetInstanceProcAddr ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
case "$LIBEXT" in
dll) ac_cv_lib_soname_MoltenVK=`$ac_cv_path_LDD conftest.exe | grep "MoltenVK" | sed -e "s/dll.*/dll/"';2,$d'` ;;
dylib) ac_cv_lib_soname_MoltenVK=`$OTOOL -L conftest$ac_exeext | grep "libMoltenVK\\.[0-9A-Za-z.]*dylib" | sed -e "s/^.*\/\(libMoltenVK\.[0-9A-Za-z.]*dylib\).*$/\1/"';2,$d'` ;;
*) ac_cv_lib_soname_MoltenVK=`$READELF -d conftest$ac_exeext | grep "NEEDED.*libMoltenVK\\.$LIBEXT" | sed -e "s/^.*\\[\\(libMoltenVK\\.$LIBEXT[^ ]*\\)\\].*$/\1/"';2,$d'`
if ${ac_cv_lib_soname_MoltenVK:+false} :; then :
ac_cv_lib_soname_MoltenVK=`$LDD conftest$ac_exeext | grep "libMoltenVK\\.$LIBEXT" | sed -e "s/^.*\(libMoltenVK\.$LIBEXT[^ ]*\).*$/\1/"';2,$d'`
fi ;;
esac
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_soname_save_LIBS
fi
if ${ac_cv_lib_soname_MoltenVK:+false} :; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_soname_MoltenVK" >&5
$as_echo "$ac_cv_lib_soname_MoltenVK" >&6; }
cat >>confdefs.h <<_ACEOF
#define SONAME_LIBMOLTENVK "$ac_cv_lib_soname_MoltenVK"
_ACEOF
fi
fi
fi
if test "x$ac_cv_lib_soname_vulkan" = "x"; then :
if test "x$ac_cv_lib_soname_vulkan" = "x" -a "x$ac_cv_lib_soname_MoltenVK" = "x"; then :
case "x$with_vulkan" in
x) as_fn_append wine_notices "|libvulkan ${notice_platform}development files not found, Vulkan won't be supported." ;;
x) as_fn_append wine_notices "|libvulkan and libMoltenVK ${notice_platform}development files not found, Vulkan won't be supported." ;;
xno) ;;
*) as_fn_error $? "libvulkan ${notice_platform}development files not found, Vulkan won't be supported.
*) as_fn_error $? "libvulkan and libMoltenVK ${notice_platform}development files not found, Vulkan won't be supported.
This is an error since --with-vulkan was requested." "$LINENO" 5 ;;
esac
......
......@@ -1858,9 +1858,13 @@ dnl *** Check for Vulkan ***
if test "x$with_vulkan" != "xno"
then
WINE_CHECK_SONAME(vulkan, vkGetInstanceProcAddr)
if test "x$ac_cv_lib_soname_vulkan" = "x"
then
WINE_CHECK_SONAME(MoltenVK, vkGetInstanceProcAddr)
fi
fi
WINE_NOTICE_WITH(vulkan,[test "x$ac_cv_lib_soname_vulkan" = "x"],
[libvulkan ${notice_platform}development files not found, Vulkan won't be supported.])
WINE_NOTICE_WITH(vulkan,[test "x$ac_cv_lib_soname_vulkan" = "x" -a "x$ac_cv_lib_soname_MoltenVK" = "x"],
[libvulkan and libMoltenVK ${notice_platform}development files not found, Vulkan won't be supported.])
dnl **** Check for vkd3d ****
if test "x$with_vkd3d" != "xno"
......
......@@ -17,6 +17,7 @@ C_SRCS = \
opengl.c \
surface.c \
systray.c \
vulkan.c \
window.c
OBJC_SRCS = \
......
......@@ -418,7 +418,7 @@ static const struct gdi_dc_funcs macdrv_funcs =
NULL, /* pUnrealizePalette */
NULL, /* pWidenPath */
macdrv_wine_get_wgl_driver, /* wine_get_wgl_driver */
NULL, /* wine_get_vulkan_driver */
macdrv_wine_get_vulkan_driver, /* wine_get_vulkan_driver */
GDI_PRIORITY_GRAPHICS_DRV /* priority */
};
......
......@@ -209,6 +209,7 @@ extern BOOL query_drag_exited(macdrv_query* query) DECLSPEC_HIDDEN;
extern BOOL query_drag_drop(macdrv_query* query) DECLSPEC_HIDDEN;
extern struct opengl_funcs *macdrv_wine_get_wgl_driver(PHYSDEV dev, UINT version) DECLSPEC_HIDDEN;
extern const struct vulkan_funcs *macdrv_wine_get_vulkan_driver(PHYSDEV dev, UINT version) DECLSPEC_HIDDEN;
extern void sync_gl_view(struct macdrv_win_data* data, const RECT* old_whole_rect, const RECT* old_client_rect) DECLSPEC_HIDDEN;
extern CGImageRef create_cgimage_from_icon_bitmaps(HDC hdc, HANDLE icon, HBITMAP hbmColor,
......
......@@ -17,6 +17,9 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
/* NOTE: If making changes here, consider whether they should be reflected in
* the other drivers. */
#include "config.h"
#include "wine/port.h"
......
......@@ -1518,6 +1518,9 @@
/* Define to the soname of the libkrb5 library. */
#undef SONAME_LIBKRB5
/* Define to the soname of the libMoltenVK library. */
#undef SONAME_LIBMOLTENVK
/* Define to the soname of the libncurses library. */
#undef SONAME_LIBNCURSES
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment