Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac index 308bdda13..77fa41c86 100644 --- a/configure.ac +++ b/configure.ac @@ -126,7 +126,7 @@ AS_IF([test "x$with_spirv_tools" = "xyes"],
HAVE_XCB=no AS_IF([test "x$with_xcb" != "xno"], - [PKG_CHECK_MODULES([XCB], [xcb xcb-keysyms], + [PKG_CHECK_MODULES([XCB], [xcb xcb-event xcb-icccm xcb-keysyms], [AC_DEFINE([HAVE_XCB], [1], [Define to 1 if you have libxcb.]) HAVE_XCB=yes], [HAVE_XCB=no])])
Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- Makefile.am | 12 ++++++++---- configure.ac | 6 ++++-- 2 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/Makefile.am b/Makefile.am index 64cfe5342..62f994bed 100644 --- a/Makefile.am +++ b/Makefile.am @@ -445,8 +445,10 @@ if HAVE_CROSSTARGET32 CROSS32_CC = @CROSSCC32@ CROSS32_DLLTOOL = @CROSSTARGET32@-dlltool CROSS32_IMPLIBS = $(cross_implibs:=.cross32.a) -CROSS32_EXEFILES = $(vkd3d_cross_tests:=.cross32.exe) \ - $(vkd3d_demos:demos/vkd3d-%=demos/%.cross32.exe) +CROSS32_EXEFILES = $(vkd3d_cross_tests:=.cross32.exe) +if BUILD_DEMOS +CROSS32_EXEFILES += $(vkd3d_demos:demos/vkd3d-%=demos/%.cross32.exe) +endif CROSS32_FILES = $(CROSS32_IMPLIBS) $(CROSS32_EXEFILES) tests/shader_runner.cross32.exe
CLEANFILES += $(CROSS32_FILES) @@ -477,8 +479,10 @@ if HAVE_CROSSTARGET64 CROSS64_CC = @CROSSCC64@ CROSS64_DLLTOOL = @CROSSTARGET64@-dlltool CROSS64_IMPLIBS = $(cross_implibs:=.cross64.a) -CROSS64_EXEFILES = $(vkd3d_cross_tests:=.cross64.exe) \ - $(vkd3d_demos:demos/vkd3d-%=demos/%.cross64.exe) +CROSS64_EXEFILES = $(vkd3d_cross_tests:=.cross64.exe) +if BUILD_DEMOS +CROSS64_EXEFILES += $(vkd3d_demos:demos/vkd3d-%=demos/%.cross64.exe) +endif CROSS64_FILES = $(CROSS64_IMPLIBS) $(CROSS64_EXEFILES) tests/shader_runner.cross64.exe
CLEANFILES += $(CROSS64_FILES) diff --git a/configure.ac b/configure.ac index 77fa41c86..97551d896 100644 --- a/configure.ac +++ b/configure.ac @@ -162,7 +162,7 @@ AC_OUTPUT
dnl Output configuration summary AS_IF([test "x$CROSSTARGET32" != "xno" -o "x$CROSSTARGET64" != "xno"], - [HAVE_CROSSTEST=yes], [HAVE_CROSSTEST=no]) + [HAVE_CROSSTARGET=yes], [HAVE_CROSSTARGET=no]) AS_IF([test $DX_FLAG_doc = 1], [HAVE_DOCS=yes], [HAVE_DOCS=no])
AS_ECHO([" @@ -177,8 +177,10 @@ AS_ECHO([" Building demos: ${enable_demos} Building tests: ${enable_tests} Building documentation: ${HAVE_DOCS} +"])
- Building crosstests: ${HAVE_CROSSTEST}"]) +AS_IF([test "x$enable_demos" = "xyes"], [AS_ECHO([" Cross-compiling demos: ${HAVE_CROSSTARGET}"])]) +AS_ECHO([" Cross-compiling tests: ${HAVE_CROSSTARGET}"]) AS_IF([test "x$CROSSTARGET32" != "xno"], [AS_ECHO([" Using 32-bit cross compiler: $CROSSCC32"])]) AS_IF([test "x$CROSSTARGET64" != "xno"], [AS_ECHO([" Using 64-bit cross compiler: $CROSSCC64"])]) AS_ECHO([])
Hi,
While running your changed tests, 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=111772
Your paranoid android.
=== debian11 (build log) ===
error: patch failed: configure.ac:126 error: patch failed: configure.ac:162 Task: Patch failed to apply
=== debian11 (build log) ===
error: patch failed: configure.ac:126 error: patch failed: configure.ac:162 Task: Patch failed to apply
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- Makefile.am | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/Makefile.am b/Makefile.am index 62f994bed..b04a06954 100644 --- a/Makefile.am +++ b/Makefile.am @@ -449,9 +449,9 @@ CROSS32_EXEFILES = $(vkd3d_cross_tests:=.cross32.exe) if BUILD_DEMOS CROSS32_EXEFILES += $(vkd3d_demos:demos/vkd3d-%=demos/%.cross32.exe) endif -CROSS32_FILES = $(CROSS32_IMPLIBS) $(CROSS32_EXEFILES) tests/shader_runner.cross32.exe +CROSS32_FILES = $(CROSS32_EXEFILES) tests/shader_runner.cross32.exe
-CLEANFILES += $(CROSS32_FILES) +CLEANFILES += $(CROSS32_IMPLIBS) $(CROSS32_FILES) crosstest32: $(CROSS32_FILES)
-include tests/$(DEPDIR)/*.cross32.Po @@ -483,9 +483,9 @@ CROSS64_EXEFILES = $(vkd3d_cross_tests:=.cross64.exe) if BUILD_DEMOS CROSS64_EXEFILES += $(vkd3d_demos:demos/vkd3d-%=demos/%.cross64.exe) endif -CROSS64_FILES = $(CROSS64_IMPLIBS) $(CROSS64_EXEFILES) tests/shader_runner.cross64.exe +CROSS64_FILES = $(CROSS64_EXEFILES) tests/shader_runner.cross64.exe
-CLEANFILES += $(CROSS64_FILES) +CLEANFILES += $(CROSS64_IMPLIBS) $(CROSS64_FILES) crosstest64: $(CROSS64_FILES)
-include tests/$(DEPDIR)/*.cross64.Po
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- Makefile.am | 22 ++++++++++++++++++---- configure.ac | 4 +++- 2 files changed, 21 insertions(+), 5 deletions(-)
diff --git a/Makefile.am b/Makefile.am index b04a06954..dcfc81f91 100644 --- a/Makefile.am +++ b/Makefile.am @@ -445,11 +445,18 @@ if HAVE_CROSSTARGET32 CROSS32_CC = @CROSSCC32@ CROSS32_DLLTOOL = @CROSSTARGET32@-dlltool CROSS32_IMPLIBS = $(cross_implibs:=.cross32.a) -CROSS32_EXEFILES = $(vkd3d_cross_tests:=.cross32.exe) +CROSS32_EXEFILES = +if BUILD_TESTS +CROSS32_EXEFILES += $(vkd3d_cross_tests:=.cross32.exe) +endif if BUILD_DEMOS CROSS32_EXEFILES += $(vkd3d_demos:demos/vkd3d-%=demos/%.cross32.exe) endif -CROSS32_FILES = $(CROSS32_EXEFILES) tests/shader_runner.cross32.exe + +CROSS32_FILES = $(CROSS32_EXEFILES) +if BUILD_TESTS +CROSS32_FILES += tests/shader_runner.cross32.exe +endif
CLEANFILES += $(CROSS32_IMPLIBS) $(CROSS32_FILES) crosstest32: $(CROSS32_FILES) @@ -479,11 +486,18 @@ if HAVE_CROSSTARGET64 CROSS64_CC = @CROSSCC64@ CROSS64_DLLTOOL = @CROSSTARGET64@-dlltool CROSS64_IMPLIBS = $(cross_implibs:=.cross64.a) -CROSS64_EXEFILES = $(vkd3d_cross_tests:=.cross64.exe) +CROSS64_EXEFILES = +if BUILD_TESTS +CROSS64_EXEFILES += $(vkd3d_cross_tests:=.cross64.exe) +endif if BUILD_DEMOS CROSS64_EXEFILES += $(vkd3d_demos:demos/vkd3d-%=demos/%.cross64.exe) endif -CROSS64_FILES = $(CROSS64_EXEFILES) tests/shader_runner.cross64.exe + +CROSS64_FILES = $(CROSS64_EXEFILES) +if BUILD_TESTS +CROSS64_FILES += tests/shader_runner.cross64.exe +endif
CLEANFILES += $(CROSS64_IMPLIBS) $(CROSS64_FILES) crosstest64: $(CROSS64_FILES) diff --git a/configure.ac b/configure.ac index 97551d896..a58e453f3 100644 --- a/configure.ac +++ b/configure.ac @@ -165,6 +165,8 @@ AS_IF([test "x$CROSSTARGET32" != "xno" -o "x$CROSSTARGET64" != "xno"], [HAVE_CROSSTARGET=yes], [HAVE_CROSSTARGET=no]) AS_IF([test $DX_FLAG_doc = 1], [HAVE_DOCS=yes], [HAVE_DOCS=no])
+AS_IF([test "x$enable_demos" != "xyes" -a "x$enable_tests" = "xno"], [CROSSTARGET64=no CROSSTARGET32=no]) + AS_ECHO([" Configuration summary for $PACKAGE $VERSION
@@ -180,7 +182,7 @@ AS_ECHO([" "])
AS_IF([test "x$enable_demos" = "xyes"], [AS_ECHO([" Cross-compiling demos: ${HAVE_CROSSTARGET}"])]) -AS_ECHO([" Cross-compiling tests: ${HAVE_CROSSTARGET}"]) +AS_IF([test "x$enable_tests" != "xno"], [AS_ECHO([" Cross-compiling tests: ${HAVE_CROSSTARGET}"])]) AS_IF([test "x$CROSSTARGET32" != "xno"], [AS_ECHO([" Using 32-bit cross compiler: $CROSSCC32"])]) AS_IF([test "x$CROSSTARGET64" != "xno"], [AS_ECHO([" Using 64-bit cross compiler: $CROSSCC64"])]) AS_ECHO([])
Hi,
While running your changed tests, 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=111773
Your paranoid android.
=== debian11 (build log) ===
error: patch failed: configure.ac:126 error: patch failed: configure.ac:162 error: patch failed: configure.ac:165 Task: Patch failed to apply
=== debian11 (build log) ===
error: patch failed: configure.ac:126 error: patch failed: configure.ac:162 error: patch failed: configure.ac:165 Task: Patch failed to apply
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Disable tests in this case, and do not attempt to load libvulkan from within vkd3d itself.
Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- Should libvulkan support be explicitly disabled with a configure argument instead?
configure.ac | 15 ++++++++------ include/vkd3d.h | 5 ++++- libs/vkd3d/device.c | 6 ++++++ m4/check-vulkan.m4 | 3 +-- m4/notice.m4 | 49 +++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 69 insertions(+), 9 deletions(-) create mode 100644 m4/notice.m4
diff --git a/configure.ac b/configure.ac index a58e453f3..33098951a 100644 --- a/configure.ac +++ b/configure.ac @@ -13,11 +13,9 @@ AC_ARG_WITH([spirv-tools], AS_HELP_STRING([--with-spirv-tools], [Build with SPIRV-Tools library (default: disabled)])) AC_ARG_WITH([xcb], AS_HELP_STRING([--with-xcb], [Build with XCB library (default: test)])) AC_ARG_ENABLE([demos], - AS_HELP_STRING([--enable-demos], [Build demo programs (default: disabled)]),, - [enable_demos=no]) + AS_HELP_STRING([--enable-demos], [Build demo programs (default: disabled)])) AC_ARG_ENABLE([tests], - AS_HELP_STRING([--enable-tests], [Build tests (default: enabled)]),, - [enable_tests=yes]) + AS_HELP_STRING([--enable-tests], [Build tests (default: enabled)]))
AC_USE_SYSTEM_EXTENSIONS
@@ -114,6 +112,9 @@ esac
AC_ARG_VAR([VULKAN_LIBS], [linker flags for the Vulkan library]) VKD3D_CHECK_VULKAN +AS_IF([test "x$VULKAN_LIBS" = "x" -a "x$enable_demos" = "xyes"], + [AC_MSG_ERROR([No Vulkan library found. This is an error since --enable-demos was requested.])]) +VKD3D_WARNING_ENABLE(tests,[test "x$VULKAN_LIBS" = "x"],[No Vulkan library found, tests will be disabled.],[enable_tests])
AS_IF([test "x$with_ncurses" != "xno"], [PKG_CHECK_MODULES([NCURSES], [ncurses], @@ -176,8 +177,8 @@ AS_ECHO([" Have SPIRV-Tools: ${with_spirv_tools} Have xcb: ${HAVE_XCB}
- Building demos: ${enable_demos} - Building tests: ${enable_tests} + Building demos: ${enable_demos:-no} + Building tests: ${enable_tests:-yes} Building documentation: ${HAVE_DOCS} "])
@@ -186,3 +187,5 @@ AS_IF([test "x$enable_tests" != "xno"], [AS_ECHO([" Cross-compiling tests: ${HA AS_IF([test "x$CROSSTARGET32" != "xno"], [AS_ECHO([" Using 32-bit cross compiler: $CROSSCC32"])]) AS_IF([test "x$CROSSTARGET64" != "xno"], [AS_ECHO([" Using 64-bit cross compiler: $CROSSCC64"])]) AS_ECHO([]) + +VKD3D_PRINT_MESSAGES diff --git a/include/vkd3d.h b/include/vkd3d.h index bce3c6e4b..b7f49835b 100644 --- a/include/vkd3d.h +++ b/include/vkd3d.h @@ -81,7 +81,10 @@ struct vkd3d_instance_create_info PFN_vkd3d_join_thread pfn_join_thread; size_t wchar_size;
- /* If set to NULL, libvkd3d loads libvulkan. */ + /** + * If set to NULL, and libvulkan was available at build time, libvkd3d will + * attempt to load libvulkan. + */ PFN_vkGetInstanceProcAddr pfn_vkGetInstanceProcAddr;
const char * const *instance_extensions; diff --git a/libs/vkd3d/device.c b/libs/vkd3d/device.c index d23062d09..985fb3f80 100644 --- a/libs/vkd3d/device.c +++ b/libs/vkd3d/device.c @@ -477,6 +477,7 @@ static HRESULT vkd3d_init_vk_global_procs(struct vkd3d_instance *instance,
if (!vkGetInstanceProcAddr) { +#ifdef SONAME_LIBVULKAN if (!(instance->libvulkan = vkd3d_dlopen(SONAME_LIBVULKAN))) { ERR("Failed to load libvulkan: %s.\n", vkd3d_dlerror()); @@ -490,6 +491,11 @@ static HRESULT vkd3d_init_vk_global_procs(struct vkd3d_instance *instance, instance->libvulkan = NULL; return E_FAIL; } +#else + ERR("No function pointer for vkGetInstanceProcAddr was provided,\n"); + ERR("and libvulkan was not available at build time.\n"); + return E_FAIL; +#endif } else { diff --git a/m4/check-vulkan.m4 b/m4/check-vulkan.m4 index 756f61a0e..fa6f9dbc3 100644 --- a/m4/check-vulkan.m4 +++ b/m4/check-vulkan.m4 @@ -8,8 +8,7 @@ VKD3D_CHECK_SONAME([vulkan], [vkGetInstanceProcAddr], [VKD3D_CHECK_SONAME([MoltenVK], [vkGetInstanceProcAddr], [VULKAN_LIBS="$VULKAN_LIBS -lMoltenVK" AC_DEFINE_UNQUOTED([SONAME_LIBVULKAN], - ["$ac_cv_lib_soname_MoltenVK"])], - [AC_MSG_ERROR([libvulkan and libMoltenVK not found.])], + ["$ac_cv_lib_soname_MoltenVK"])],, [$VULKAN_LIBS])], [$VULKAN_LIBS])], [$VULKAN_LIBS]) diff --git a/m4/notice.m4 b/m4/notice.m4 new file mode 100644 index 000000000..4e788902b --- /dev/null +++ b/m4/notice.m4 @@ -0,0 +1,49 @@ +dnl +dnl Copyright 2002 Alexandre Julliard +dnl +dnl This library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public +dnl License as published by the Free Software Foundation; either +dnl version 2.1 of the License, or (at your option) any later version. +dnl +dnl This library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. +dnl +dnl You should have received a copy of the GNU Lesser General Public +dnl License along with this library; if not, write to the Free Software +dnl Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA +dnl +dnl As a special exception to the GNU Lesser General Public License, +dnl if you distribute this file as part of a program that contains a +dnl configuration script generated by Autoconf, you may include it +dnl under the same distribution terms that you use for the rest of +dnl that program. + + + +dnl **** Add a message to the list displayed at the end **** +dnl +dnl Usage: VKD3D_WARNING(warning) +dnl Usage: VKD3D_WARNING_ENABLE(enable_flag, test, warning, enable) +dnl Usage: VKD3D_PRINT_MESSAGES +dnl +AC_DEFUN([VKD3D_WARNING],[AS_VAR_APPEND([vkd3d_warnings],["|$1"])]) + +AC_DEFUN([VKD3D_WARNING_ENABLE],[AS_IF([$2],[case "x$enable_$1" in + x) VKD3D_WARNING([$3]) ;; + xno) ;; + *) AC_MSG_ERROR([$3 +This is an error since --enable-$1 was requested.]) ;; +esac +m4_ifval([$4],[$4=${$4:-no}])])]) + +AC_DEFUN([VKD3D_PRINT_MESSAGES],[ac_save_IFS="$IFS" +IFS="|" +for msg in $vkd3d_warnings; do + IFS="$ac_save_IFS" + AS_VAR_IF([msg],[],,[echo >&2 + AC_MSG_WARN([$msg])]) +done +IFS="$ac_save_IFS"])
Hi,
While running your changed tests, 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=111774
Your paranoid android.
=== debian11 (build log) ===
error: patch failed: configure.ac:126 error: patch failed: configure.ac:162 error: patch failed: configure.ac:165 error: patch failed: configure.ac:13 Task: Patch failed to apply
=== debian11 (build log) ===
error: patch failed: configure.ac:126 error: patch failed: configure.ac:162 error: patch failed: configure.ac:165 error: patch failed: configure.ac:13 Task: Patch failed to apply
On Fri, 1 Apr 2022 at 23:17, Zebediah Figura zfigura@codeweavers.com wrote:
Should libvulkan support be explicitly disabled with a configure argument instead?
I think so, or at least the implications of building without libvulkan should be more explicit. For example, this is going to make libvkd3d-utils largely non-functional because D3D12CreateDevice() depends on vkd3d's ability to load libvulkan by itself. Similarly, in most cases applications using vkd3d would be expected to pass NULL as "pfn_vkGetInstanceProcAddr", and would be broken on such a build. The commit message could use some elaboration on why someone might want to make such a build.
An alternative worth considering may be to explicitly specify the library name to load at run-time to configure, instead of disabling loading the Vulkan library completely. I.e., a Win32 build could configure with something like SONAME_LIBVULKAN="vulkan-1.dll".
On 4/5/22 06:29, Henri Verbeet wrote:
On Fri, 1 Apr 2022 at 23:17, Zebediah Figura zfigura@codeweavers.com wrote:
Should libvulkan support be explicitly disabled with a configure argument instead?
I think so, or at least the implications of building without libvulkan should be more explicit. For example, this is going to make libvkd3d-utils largely non-functional because D3D12CreateDevice() depends on vkd3d's ability to load libvulkan by itself. Similarly, in most cases applications using vkd3d would be expected to pass NULL as "pfn_vkGetInstanceProcAddr", and would be broken on such a build. The commit message could use some elaboration on why someone might want to make such a build.
Right, I think that makes sense to me. I'll rework the patch.
An alternative worth considering may be to explicitly specify the library name to load at run-time to configure, instead of disabling loading the Vulkan library completely. I.e., a Win32 build could configure with something like SONAME_LIBVULKAN="vulkan-1.dll".
Being able to manually override the soname seems like a good idea as well. Given the motivation is "make it simpler to build MinGW vkd3d", specifying the soname would also allow that to happen without sacrificing any functionality.
Hi,
While running your changed tests, 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=111770
Your paranoid android.
=== debian11 (build log) ===
error: patch failed: configure.ac:126 Task: Patch failed to apply
=== debian11 (build log) ===
error: patch failed: configure.ac:126 Task: Patch failed to apply