That function exists on Mac, but it only takes a single argument, the thread's new name. That's OK for our purposes, since we were calling it on pthread_self anyhow.
Signed-off-by: Chip Davis cdavis@codeweavers.com ---
Notes: Try 2: Pull the pthread_setname_np(3) call into a header.
libs/vkd3d/command.c | 4 +--- libs/vkd3d/vkd3d_private.h | 11 +++++++++++ 2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/libs/vkd3d/command.c b/libs/vkd3d/command.c index 4db9967..042d2f1 100644 --- a/libs/vkd3d/command.c +++ b/libs/vkd3d/command.c @@ -199,9 +199,7 @@ static void *vkd3d_fence_worker_main(void *arg) struct vkd3d_fence_worker *worker = arg; int rc;
-#ifdef HAVE_PTHREAD_SETNAME_NP - pthread_setname_np(pthread_self(), "vkd3d_worker"); -#endif + vkd3d_set_thread_name("vkd3d_worker");
for (;;) { diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h index 8efb930..b233d94 100644 --- a/libs/vkd3d/vkd3d_private.h +++ b/libs/vkd3d/vkd3d_private.h @@ -86,6 +86,17 @@ struct vkd3d_vulkan_info VkPhysicalDeviceSparseProperties sparse_properties; };
+static inline void vkd3d_set_thread_name(const char *name) +{ +#ifdef HAVE_PTHREAD_SETNAME_NP +#ifdef __APPLE__ + pthread_setname_np(name); +#else + pthread_setname_np(pthread_self(), name); +#endif +#endif +} + struct vkd3d_instance { VkInstance vk_instance;
BSD sed(1) requires an argument after -i giving the suffix to put on the backup it makes. Also, the regular expression given doesn't seem to work for me. This command should work everywhere.
Signed-off-by: Chip Davis cdavis@codeweavers.com --- Makefile.am | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/Makefile.am b/Makefile.am index 14f2d51..e64acb7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -150,8 +150,9 @@ vkd3d_v_widl_1 = EXTRA_DIST += $(widl_headers) $(widl_headers:.h=.idl) $(widl_headers): %.h: %.idl if HAVE_WIDL - $(VKD3D_V_WIDL)$(WIDL) -o $@ $< - sed -e '/#include <(rpc.h|rpcndr.h)>/d' -i $@ + $(VKD3D_V_WIDL)$(WIDL) -o $@.tmp $< + $(SED) -e '/#include <rpc.h>/d' -e '/#include <rpcndr.h>/d' <$@.tmp >$@ + $(RM) -f $@.tmp else echo "widl is required to generate $<" endif
Signed-off-by: Chip Davis cdavis@codeweavers.com --- Makefile.am | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/Makefile.am b/Makefile.am index e64acb7..ff7abb0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -151,16 +151,16 @@ EXTRA_DIST += $(widl_headers) $(widl_headers:.h=.idl) $(widl_headers): %.h: %.idl if HAVE_WIDL $(VKD3D_V_WIDL)$(WIDL) -o $@.tmp $< - $(SED) -e '/#include <rpc.h>/d' -e '/#include <rpcndr.h>/d' <$@.tmp >$@ - $(RM) -f $@.tmp + $(AM_V_at)$(SED) -e '/#include <rpc.h>/d' -e '/#include <rpcndr.h>/d' <$@.tmp >$@ + $(AM_V_at)$(RM) -f $@.tmp else - echo "widl is required to generate $<" + @echo "widl is required to generate $<" endif
EXTRA_DIST += $(vkd3d_demos_shaders)
libvkd3d-utils.pc: $(srcdir)/libs/vkd3d-utils/libvkd3d-utils.pc.in - sed -e 's![@]prefix[@]!$(prefix)!g' \ + $(AM_V_GEN)$(SED) -e 's![@]prefix[@]!$(prefix)!g' \ -e 's![@]exec_prefix[@]!$(exec_prefix)!g' \ -e 's![@]includedir[@]!$(includedir)!g' \ -e 's![@]libdir[@]!$(libdir)!g' \ @@ -168,7 +168,7 @@ libvkd3d-utils.pc: $(srcdir)/libs/vkd3d-utils/libvkd3d-utils.pc.in $< > $@
libvkd3d.pc: $(srcdir)/libs/vkd3d/libvkd3d.pc.in - sed -e 's![@]prefix[@]!$(prefix)!g' \ + $(AM_V_GEN)$(SED) -e 's![@]prefix[@]!$(prefix)!g' \ -e 's![@]exec_prefix[@]!$(exec_prefix)!g' \ -e 's![@]includedir[@]!$(includedir)!g' \ -e 's![@]libdir[@]!$(libdir)!g' \ @@ -176,7 +176,7 @@ libvkd3d.pc: $(srcdir)/libs/vkd3d/libvkd3d.pc.in $< > $@
libs/vkd3d_version.c: dummy-vkd3d-version - version=`(GIT_DIR=$(top_srcdir)/.git git describe HEAD 2>/dev/null || echo "vkd3d-$(PACKAGE_VERSION)") | sed -n -e '$$s/(.*)/const char vkd3d_build[] = "\1";/p'` && (echo $$version | cmp -s - $@) || echo $$version >$@ || ($(RM) $@ && exit 1) + $(AM_V_GEN)version=`(GIT_DIR=$(top_srcdir)/.git git describe HEAD 2>/dev/null || echo "vkd3d-$(PACKAGE_VERSION)") | $(SED) -n -e '$$s/(.*)/const char vkd3d_build[] = "\1";/p'` && (echo $$version | cmp -s - $@) || echo $$version >$@ || ($(RM) $@ && exit 1) .SILENT: libs/vkd3d_version.c CLEANFILES += libs/vkd3d_version.c
Signed-off-by: Chip Davis cdavis@codeweavers.com --- Makefile.am | 4 ++++ configure.ac | 12 ++++++++++++ 2 files changed, 16 insertions(+)
diff --git a/Makefile.am b/Makefile.am index ff7abb0..7723fad 100644 --- a/Makefile.am +++ b/Makefile.am @@ -131,16 +131,20 @@ TESTS = $(vkd3d_tests) $(vkd3d_cross_tests) tests_d3d12_LDADD = $(LDADD) @PTHREAD_LIBS@ tests_vkd3d_api_LDADD = libvkd3d.la @VULKAN_LIBS@
+if BUILD_DEMOS DEMOS_LDADD = $(LDADD) libvkd3d-shader.la @XCB_LIBS@ @VULKAN_LIBS@ DEMOS_CFLAGS = $(AM_CFLAGS) @XCB_CFLAGS@ noinst_PROGRAMS += $(vkd3d_demos) +endif EXTRA_DIST += $(vkd3d_test_headers) $(vkd3d_demos_headers)
+if BUILD_DEMOS demos_gears_CFLAGS = $(DEMOS_CFLAGS) demos_gears_LDADD = $(DEMOS_LDADD) -lm
demos_triangle_CFLAGS = $(DEMOS_CFLAGS) demos_triangle_LDADD = $(DEMOS_LDADD) +endif
VKD3D_V_WIDL = $(vkd3d_v_widl_@AM_V@) vkd3d_v_widl_ = $(vkd3d_v_widl_@AM_DEFAULT_V@) diff --git a/configure.ac b/configure.ac index 2773a15..7c2a560 100644 --- a/configure.ac +++ b/configure.ac @@ -86,6 +86,18 @@ AS_IF([test "x$with_spirv_tools" = "xyes"], HAVE_SPIRV_TOOLS=yes])])
PKG_CHECK_MODULES([XCB], [xcb xcb-keysyms]) +case $host_os in + darwin*|macosx*) + enable_demos_default=no + ;; + *) + enable_demos_default=yes + ;; +esac + +AC_ARG_ENABLE([demos], AS_HELP_STRING([--enable-demos], [Build demo programs]),, + [enable_demos=$enable_demos_default]) +AM_CONDITIONAL(BUILD_DEMOS, [test "x$enable_demos" != "xno"])
dnl Check for functions VKD3D_CHECK_FUNC([HAVE_BUILTIN_CLZ], [__builtin_clz], [__builtin_clz(0)])
Signed-off-by: Chip Davis cdavis@codeweavers.com ---
Notes: Try 2: Drop support for the demos; they require Objective-C. Check for MoltenVK instead of if we're building for Mac. Check for the name of the library to load in configure.
For that last one, I've appropriated WINE_CHECK_SONAME().
configure.ac | 18 ++++++++++--- libs/vkd3d-utils/vkd3d_utils_main.c | 4 +++ libs/vkd3d-utils/vkd3d_utils_private.h | 7 +++++ libs/vkd3d/device.c | 4 +-- m4/check-soname.m4 | 36 ++++++++++++++++++++++++++ tests/vkd3d_api.c | 16 ++++++++++++ 6 files changed, 79 insertions(+), 6 deletions(-) create mode 100644 m4/check-soname.m4
diff --git a/configure.ac b/configure.ac index 7c2a560..76ed60c 100644 --- a/configure.ac +++ b/configure.ac @@ -75,9 +75,12 @@ AC_CHECK_LIB([pthread], [pthread_create], [AC_MSG_ERROR([libpthread not found.])])
AC_SUBST([VULKAN_LIBS]) -AC_CHECK_LIB([vulkan], [vkGetInstanceProcAddr], - [VULKAN_LIBS="-lvulkan"], - [AC_MSG_ERROR([libvulkan not found.])]) +VKD3D_CHECK_SONAME([vulkan], [vkGetInstanceProcAddr], + [VULKAN_LIBS="-lvulkan"], + [VKD3D_CHECK_SONAME([MoltenVK], [vkGetInstanceProcAddr], + [VULKAN_LIBS="-lMoltenVK" + AC_DEFINE_UNQUOTED([SONAME_LIBVULKAN],["$ac_cv_lib_soname_MoltenVK"])], + [AC_MSG_ERROR([libvulkan and libMoltenVK not found.])])])
HAVE_SPIRV_TOOLS=no AS_IF([test "x$with_spirv_tools" = "xyes"], @@ -85,12 +88,19 @@ AS_IF([test "x$with_spirv_tools" = "xyes"], [AC_DEFINE([HAVE_SPIRV_TOOLS], [1], [Define to 1 if you have SPIRV-Tools.]) HAVE_SPIRV_TOOLS=yes])])
-PKG_CHECK_MODULES([XCB], [xcb xcb-keysyms]) case $host_os in darwin*|macosx*) + AC_CHECK_HEADERS(MoltenVK/vk_mvk_moltenvk.h) + AS_IF([test "x$ac_cv_header_MoltenVK_vk_mvk_moltenvk_h" = "xno"], + [AC_MSG_ERROR([MoltenVK is required to use vkd3d on Mac OS.])]) enable_demos_default=no ;; *) + PKG_CHECK_MODULES([XCB], [xcb xcb-keysyms]) + save_cppflags="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $XCB_CFLAGS" + AC_CHECK_HEADERS(xcb/xcb.h) + CPPFLAGS="$save_cppflags" enable_demos_default=yes ;; esac diff --git a/libs/vkd3d-utils/vkd3d_utils_main.c b/libs/vkd3d-utils/vkd3d_utils_main.c index 2c4d89a..a96ba68 100644 --- a/libs/vkd3d-utils/vkd3d_utils_main.c +++ b/libs/vkd3d-utils/vkd3d_utils_main.c @@ -34,7 +34,11 @@ HRESULT WINAPI D3D12CreateDevice(IUnknown *adapter, static const char * const instance_extensions[] = { VK_KHR_SURFACE_EXTENSION_NAME, +#ifdef HAVE_MOLTENVK_VK_MVK_MOLTENVK_H + VK_MVK_MACOS_SURFACE_EXTENSION_NAME, +#elif defined(HAVE_XCB_XCB_H) VK_KHR_XCB_SURFACE_EXTENSION_NAME, +#endif }; static const char * const device_extensions[] = { diff --git a/libs/vkd3d-utils/vkd3d_utils_private.h b/libs/vkd3d-utils/vkd3d_utils_private.h index 6aa0df6..9e4249c 100644 --- a/libs/vkd3d-utils/vkd3d_utils_private.h +++ b/libs/vkd3d-utils/vkd3d_utils_private.h @@ -20,7 +20,14 @@ #define __VKD3D_UTILS_PRIVATE_H
#define VK_NO_PROTOTYPES + +#include "config.h" + +#ifdef HAVE_MOLTENVK_VK_MVK_MOLTENVK_H +#define VK_USE_PLATFORM_MACOS_MVK +#elif defined(HAVE_XCB_XCB_H) #define VK_USE_PLATFORM_XCB_KHR +#endif
#include <pthread.h> #include <vkd3d.h> diff --git a/libs/vkd3d/device.c b/libs/vkd3d/device.c index 6fa0017..4e5a9b0 100644 --- a/libs/vkd3d/device.c +++ b/libs/vkd3d/device.c @@ -212,9 +212,9 @@ static HRESULT vkd3d_init_vk_global_procs(struct vkd3d_instance *instance,
if (!vkGetInstanceProcAddr) { - if (!(instance->libvulkan = dlopen("libvulkan.so.1", RTLD_NOW))) + if (!(instance->libvulkan = dlopen(SONAME_LIBVULKAN, RTLD_NOW))) { - ERR("Failed to load libvulkan.\n"); + ERR("Failed to load libvulkan: %s\n", dlerror()); return E_FAIL; }
diff --git a/m4/check-soname.m4 b/m4/check-soname.m4 new file mode 100644 index 0000000..0b231ff --- /dev/null +++ b/m4/check-soname.m4 @@ -0,0 +1,36 @@ +dnl +dnl This file contains code derived from WINE_CHECK_SONAME() and is used courtesy of Alexandre Julliard. +dnl + +dnl VKD3D_PATH_SONAME_TOOLS +AC_DEFUN([VKD3D_PATH_SONAME_TOOLS], +[AC_PATH_PROG(LDD,ldd,true,/sbin:/usr/sbin:$PATH) +AC_CHECK_TOOL(OTOOL,otool,otool) +AC_CHECK_TOOL(READELF,[readelf],true)]) + +dnl VKD3D_CHECK_SONAME(library, function, [action-if-found, [action-if-not-found, [other_libraries, [pattern]]]]) +dnl +AC_DEFUN([VKD3D_CHECK_SONAME], +[AC_REQUIRE([VKD3D_PATH_SONAME_TOOLS])dnl +AS_VAR_PUSHDEF([ac_Lib],[ac_cv_lib_soname_$1])dnl +m4_pushdef([ac_lib_pattern],m4_default([$6],[lib$1]))dnl +AC_MSG_CHECKING([for -l$1]) +AC_CACHE_VAL(ac_Lib, +[ac_check_soname_save_LIBS=$LIBS + LIBS="-l$1 $5 $LIBS" + AC_LINK_IFELSE([AC_LANG_CALL([], [$2])], + [AS_CASE(["$host_os"], + [darwin*|macosx*], [AS_VAR_SET(ac_Lib,[`$OTOOL -L conftest$ac_exeext | grep "]ac_lib_pattern[\.[[0-9A-Za-z.]]*dylib" | sed -e "s/^.*/(]ac_lib_pattern[.[[0-9A-Za-z.]]*dylib).*$/\1/"';2,$d'`])], + [AS_VAR_SET(ac_Lib,[`$READELF -d conftest$ac_exeext | grep "NEEDED.*]ac_lib_pattern[\.$LIBEXT" | sed -e "s/^.*\m4_dquote(\(]ac_lib_pattern[\.$LIBEXT[[^ ]]*\)\).*$/\1/"';2,$d'`]) + AS_VAR_IF([ac_Lib],[], + [AS_VAR_SET(ac_Lib,[`$LDD conftest$ac_exeext | grep "]ac_lib_pattern[\.$LIBEXT" | sed -e "s/^.*(]ac_lib_pattern[.$LIBEXT[[^ ]]*).*$/\1/"';2,$d'`])])])]) + LIBS=$ac_check_soname_save_LIBS])dnl +AS_VAR_IF([ac_Lib],[], + [AC_MSG_RESULT([not found]) + $4], + [AC_MSG_RESULT(AS_VAR_GET(ac_Lib)) + AC_DEFINE_UNQUOTED(AS_TR_CPP(SONAME_LIB$1),["]AS_VAR_GET(ac_Lib)["], + [Define to the soname of the lib$1 library.]) + $3])dnl +m4_popdef([ac_lib_pattern])dnl +AS_VAR_POPDEF([ac_Lib])]) diff --git a/tests/vkd3d_api.c b/tests/vkd3d_api.c index e2d9d01..dc253e9 100644 --- a/tests/vkd3d_api.c +++ b/tests/vkd3d_api.c @@ -19,8 +19,12 @@ #define COBJMACROS #define INITGUID #define WIDL_C_INLINE_WRAPPERS +#ifdef HAVE_MOLTENVK_VK_MVK_MOLTENVK_H +#define VK_USE_PLATFORM_MACOS_MVK +#else #define VK_USE_PLATFORM_XCB_KHR #define VK_USE_PLATFORM_XLIB_KHR +#endif #include "vkd3d_test.h" #include <vkd3d.h>
@@ -215,8 +219,12 @@ static void test_additional_instance_extensions(void) struct vulkan_extension extensions[] = { {VK_KHR_SURFACE_EXTENSION_NAME}, +#ifdef HAVE_MOLTENVK_VK_MVK_MOLTENVK_H + {VK_MVK_MACOS_SURFACE_EXTENSION_NAME}, +#else {VK_KHR_XCB_SURFACE_EXTENSION_NAME}, {VK_KHR_XLIB_SURFACE_EXTENSION_NAME}, +#endif };
const char *enabled_extensions[ARRAY_SIZE(extensions)]; @@ -249,6 +257,13 @@ static void test_additional_instance_extensions(void) if (!extensions[i].is_supported) continue;
+#ifdef HAVE_MOLTENVK_VK_MVK_MOLTENVK_H + if (!strcmp(extensions[i].name, VK_MVK_MACOS_SURFACE_EXTENSION_NAME)) + { + pfn = vkGetInstanceProcAddr(vk_instance, "vkCreateMacOSSurfaceMVK"); + ok(pfn, "Failed to get proc addr for vkCreateMacOSSurfaceMVK.\n"); + } +#else if (!strcmp(extensions[i].name, VK_KHR_XCB_SURFACE_EXTENSION_NAME)) { pfn = vkGetInstanceProcAddr(vk_instance, "vkCreateXcbSurfaceKHR"); @@ -259,6 +274,7 @@ static void test_additional_instance_extensions(void) pfn = vkGetInstanceProcAddr(vk_instance, "vkCreateXlibSurfaceKHR"); ok(pfn, "Failed to get proc addr for vkCreateXlibSurfaceKHR.\n"); } +#endif }
refcount = vkd3d_instance_decref(instance);
Hi,
While running your changed tests on Windows, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=40447
Your paranoid android.
=== debian9 (build) === error: patch failed: configure.ac:86 error: patch failed: configure.ac:75 Task: Patch failed to apply
On 4 August 2018 at 01:42, Chip Davis cdavis@codeweavers.com wrote:
diff --git a/configure.ac b/configure.ac index 7c2a560..76ed60c 100644 --- a/configure.ac +++ b/configure.ac @@ -75,9 +75,12 @@ AC_CHECK_LIB([pthread], [pthread_create], [AC_MSG_ERROR([libpthread not found.])])
AC_SUBST([VULKAN_LIBS]) -AC_CHECK_LIB([vulkan], [vkGetInstanceProcAddr],
[VULKAN_LIBS="-lvulkan"],
[AC_MSG_ERROR([libvulkan not found.])])
+VKD3D_CHECK_SONAME([vulkan], [vkGetInstanceProcAddr],
[VULKAN_LIBS="-lvulkan"],
[VKD3D_CHECK_SONAME([MoltenVK], [vkGetInstanceProcAddr],
[VULKAN_LIBS="-lMoltenVK"
AC_DEFINE_UNQUOTED([SONAME_LIBVULKAN],["$ac_cv_lib_soname_MoltenVK"])],
[AC_MSG_ERROR([libvulkan and libMoltenVK not found.])])])
Introducing SONAME_LIBVULKAN is a separate change from adding MoltenVK support.
diff --git a/libs/vkd3d-utils/vkd3d_utils_main.c b/libs/vkd3d-utils/vkd3d_utils_main.c index 2c4d89a..a96ba68 100644 --- a/libs/vkd3d-utils/vkd3d_utils_main.c +++ b/libs/vkd3d-utils/vkd3d_utils_main.c @@ -34,7 +34,11 @@ HRESULT WINAPI D3D12CreateDevice(IUnknown *adapter, static const char * const instance_extensions[] = { VK_KHR_SURFACE_EXTENSION_NAME, +#ifdef HAVE_MOLTENVK_VK_MVK_MOLTENVK_H
VK_MVK_MACOS_SURFACE_EXTENSION_NAME,
+#elif defined(HAVE_XCB_XCB_H) VK_KHR_XCB_SURFACE_EXTENSION_NAME, +#endif
I don't think those are necessarily mutually exclusive.
diff --git a/m4/check-soname.m4 b/m4/check-soname.m4 new file mode 100644 index 0000000..0b231ff --- /dev/null +++ b/m4/check-soname.m4 @@ -0,0 +1,36 @@ +dnl +dnl This file contains code derived from WINE_CHECK_SONAME() and is used courtesy of Alexandre Julliard. +dnl
I don't think you can add that unless you actually asked Alexandre. However, that's not an issue anymore since we can just use this under the LGPL. It should probably just have the regular copyright header instead.
August 7, 2018 1:42 PM, "Henri Verbeet" hverbeet@gmail.com wrote:
On 4 August 2018 at 01:42, Chip Davis cdavis@codeweavers.com wrote:
diff --git a/configure.ac b/configure.ac index 7c2a560..76ed60c 100644 --- a/configure.ac +++ b/configure.ac @@ -75,9 +75,12 @@ AC_CHECK_LIB([pthread], [pthread_create], [AC_MSG_ERROR([libpthread not found.])])
AC_SUBST([VULKAN_LIBS]) -AC_CHECK_LIB([vulkan], [vkGetInstanceProcAddr],
- [VULKAN_LIBS="-lvulkan"],
- [AC_MSG_ERROR([libvulkan not found.])])
+VKD3D_CHECK_SONAME([vulkan], [vkGetInstanceProcAddr],
- [VULKAN_LIBS="-lvulkan"],
- [VKD3D_CHECK_SONAME([MoltenVK], [vkGetInstanceProcAddr],
- [VULKAN_LIBS="-lMoltenVK"
- AC_DEFINE_UNQUOTED([SONAME_LIBVULKAN],["$ac_cv_lib_soname_MoltenVK"])],
- [AC_MSG_ERROR([libvulkan and libMoltenVK not found.])])])
Introducing SONAME_LIBVULKAN is a separate change from adding MoltenVK support.
Yeah, I realized that shortly after submitting the patch. I wanted to wait for what other feedback you might have, though. (Yeah, *sure* I did... *suspiciously looks around the room*)
diff --git a/libs/vkd3d-utils/vkd3d_utils_main.c b/libs/vkd3d-utils/vkd3d_utils_main.c index 2c4d89a..a96ba68 100644 --- a/libs/vkd3d-utils/vkd3d_utils_main.c +++ b/libs/vkd3d-utils/vkd3d_utils_main.c @@ -34,7 +34,11 @@ HRESULT WINAPI D3D12CreateDevice(IUnknown *adapter, static const char * const instance_extensions[] = { VK_KHR_SURFACE_EXTENSION_NAME, +#ifdef HAVE_MOLTENVK_VK_MVK_MOLTENVK_H
- VK_MVK_MACOS_SURFACE_EXTENSION_NAME,
+#elif defined(HAVE_XCB_XCB_H) VK_KHR_XCB_SURFACE_EXTENSION_NAME, +#endif
I don't think those are necessarily mutually exclusive.
Except that these are passed as required extensions. That means that if any aren't present, VkInstance creation will fail.
diff --git a/m4/check-soname.m4 b/m4/check-soname.m4 new file mode 100644 index 0000000..0b231ff --- /dev/null +++ b/m4/check-soname.m4 @@ -0,0 +1,36 @@ +dnl +dnl This file contains code derived from WINE_CHECK_SONAME() and is used courtesy of Alexandre Julliard. +dnl
I don't think you can add that unless you actually asked Alexandre. However, that's not an issue anymore since we can just use this under the LGPL. It should probably just have the regular copyright header instead.
Yeah, that was just me blindly cargo-culting.
Chip
On 7 August 2018 at 23:24, Chip Davis cdavis@codeweavers.com wrote:
August 7, 2018 1:42 PM, "Henri Verbeet" hverbeet@gmail.com wrote:
On 4 August 2018 at 01:42, Chip Davis cdavis@codeweavers.com wrote:
static const char * const instance_extensions[] = { VK_KHR_SURFACE_EXTENSION_NAME, +#ifdef HAVE_MOLTENVK_VK_MVK_MOLTENVK_H
- VK_MVK_MACOS_SURFACE_EXTENSION_NAME,
+#elif defined(HAVE_XCB_XCB_H) VK_KHR_XCB_SURFACE_EXTENSION_NAME, +#endif
I don't think those are necessarily mutually exclusive.
Except that these are passed as required extensions. That means that if any aren't present, VkInstance creation will fail.
Hmm, right, that's a bit of an issue. The case of supporting both MoltenVK and XCB is probably mostly theoretic for the foreseeable future, but the case of supporting both XCB and Wayland with a single build of vkd3d is very real. Other than the "adapter" argument, D3D12CreateDevice() doesn't provide a lot of opportunities to request a specific windowing system. We may have to try what works at runtime.
Hi,
While running your changed tests on Windows, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=40446
Your paranoid android.
=== debian9 (build) === error: patch failed: configure.ac:86 Task: Patch failed to apply
On 4 August 2018 at 01:42, Chip Davis cdavis@codeweavers.com wrote:
diff --git a/configure.ac b/configure.ac index 2773a15..7c2a560 100644 --- a/configure.ac +++ b/configure.ac @@ -86,6 +86,18 @@ AS_IF([test "x$with_spirv_tools" = "xyes"], HAVE_SPIRV_TOOLS=yes])])
PKG_CHECK_MODULES([XCB], [xcb xcb-keysyms]) +case $host_os in
- darwin*|macosx*)
- enable_demos_default=no
- ;;
- *)
- enable_demos_default=yes
- ;;
+esac
+AC_ARG_ENABLE([demos], AS_HELP_STRING([--enable-demos], [Build demo programs]),,
[enable_demos=$enable_demos_default])
+AM_CONDITIONAL(BUILD_DEMOS, [test "x$enable_demos" != "xno"])
The way I'd imagine this working would be to enable the demos if we have XCB, unless they've explicitly been disabled.
August 7, 2018 1:42 PM, "Henri Verbeet" hverbeet@gmail.com wrote:
On 4 August 2018 at 01:42, Chip Davis cdavis@codeweavers.com wrote:
diff --git a/configure.ac b/configure.ac index 2773a15..7c2a560 100644 --- a/configure.ac +++ b/configure.ac @@ -86,6 +86,18 @@ AS_IF([test "x$with_spirv_tools" = "xyes"], HAVE_SPIRV_TOOLS=yes])])
PKG_CHECK_MODULES([XCB], [xcb xcb-keysyms]) +case $host_os in
- darwin*|macosx*)
- enable_demos_default=no
- ;;
- *)
- enable_demos_default=yes
- ;;
+esac
+AC_ARG_ENABLE([demos], AS_HELP_STRING([--enable-demos], [Build demo programs]),,
- [enable_demos=$enable_demos_default])
+AM_CONDITIONAL(BUILD_DEMOS, [test "x$enable_demos" != "xno"])
The way I'd imagine this working would be to enable the demos if we have XCB, unless they've explicitly been disabled.
I think we only want to enable them if we found XCB, *and* there's a Vulkan ICD that supports it.
Chip
On 4 August 2018 at 01:42, Chip Davis cdavis@codeweavers.com wrote:
$(RM) -f $@.tmp
$(RM) already (potentially) includes "-f".
On 4 August 2018 at 01:42, Chip Davis cdavis@codeweavers.com wrote:
Notes: Try 2: Pull the pthread_setname_np(3) call into a header.
That's better, but I still think configure should check which variant of pthread_setname_np() we got.