Zebediah Figura : wined3d: Redirect vkd3d log output to the Unix stderr.
Alexandre Julliard
julliard at winehq.org
Fri Jul 22 15:38:24 CDT 2022
Module: wine
Branch: master
Commit: c94be0460c87a12c8171b2932c5cdff6593c0b90
URL: https://gitlab.winehq.org/wine/wine/-/commit/c94be0460c87a12c8171b2932c5cdff6593c0b90
Author: Zebediah Figura <zfigura at codeweavers.com>
Date: Fri May 27 12:13:47 2022 -0500
wined3d: Redirect vkd3d log output to the Unix stderr.
---
configure | 10 +++++-----
configure.ac | 4 ++--
dlls/wined3d/wined3d_main.c | 14 ++++++++++++++
3 files changed, 21 insertions(+), 7 deletions(-)
diff --git a/configure b/configure
index 73bfc9d6d98..8d36a4f7fa5 100755
--- a/configure
+++ b/configure
@@ -13004,8 +13004,8 @@ then :
fi
if test "$ac_cv_mingw_header_vkd3d_h" = "yes" -a "$ac_cv_mingw_header_vkd3d_shader_h" = "yes"
then
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for vkd3d_serialize_versioned_root_signature in MinGW -lvkd3d" >&5
-printf %s "checking for vkd3d_serialize_versioned_root_signature in MinGW -lvkd3d... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for vkd3d_set_log_callback in MinGW -lvkd3d" >&5
+printf %s "checking for vkd3d_set_log_callback in MinGW -lvkd3d... " >&6; }
if test ${ac_cv_mingw_lib_vkd3d+y}
then :
printf %s "(cached) " >&6
@@ -13022,11 +13022,11 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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. */
-char vkd3d_serialize_versioned_root_signature ();
+char vkd3d_set_log_callback ();
int
main (void)
{
-return vkd3d_serialize_versioned_root_signature ();
+return vkd3d_set_log_callback ();
;
return 0;
}
@@ -13111,7 +13111,7 @@ CPPFLAGS=$ac_save_CPPFLAGS
if test "x$VKD3D_PE_LIBS" = "x"
then
- as_fn_append wine_notices "|libvkd3d ${notice_platform}MinGW development files not found; using bundled version."
+ as_fn_append wine_notices "|libvkd3d ${notice_platform}MinGW development files not found (or too old); using bundled version."
fi
if ${ZLIB_PE_CFLAGS:+false} :
diff --git a/configure.ac b/configure.ac
index 5ea0d9120f0..dd4abd39e32 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1107,7 +1107,7 @@ then
WINE_CHECK_MINGW_HEADER(vkd3d_shader.h)
if test "$ac_cv_mingw_header_vkd3d_h" = "yes" -a "$ac_cv_mingw_header_vkd3d_shader_h" = "yes"
then
- WINE_CHECK_MINGW_LIB(vkd3d,vkd3d_serialize_versioned_root_signature,[:],[:],[$VKD3D_PE_LIBS])
+ WINE_CHECK_MINGW_LIB(vkd3d,vkd3d_set_log_callback,[:],[:],[$VKD3D_PE_LIBS])
WINE_CHECK_MINGW_LIB(vkd3d-shader,vkd3d_shader_compile,[:],[:],[$VKD3D_PE_LIBS])
if test "$ac_cv_mingw_lib_vkd3d" = "no" -o "$ac_cv_mingw_lib_vkd3d_shader" = "no"
then
@@ -1120,7 +1120,7 @@ then
fi])
if test "x$VKD3D_PE_LIBS" = "x"
then
- WINE_NOTICE([libvkd3d ${notice_platform}MinGW development files not found; using bundled version.])
+ WINE_NOTICE([libvkd3d ${notice_platform}MinGW development files not found (or too old); using bundled version.])
fi
WINE_MINGW_PACKAGE_FLAGS(ZLIB,[zlib],[-lz],
diff --git a/dlls/wined3d/wined3d_main.c b/dlls/wined3d/wined3d_main.c
index 35973e210b0..4b718746b6a 100644
--- a/dlls/wined3d/wined3d_main.c
+++ b/dlls/wined3d/wined3d_main.c
@@ -22,8 +22,12 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
+#define VKD3D_NO_VULKAN_H
+#define VKD3D_NO_WIN32_TYPES
#include "initguid.h"
#include "wined3d_private.h"
+#include "d3d12.h"
+#include <vkd3d.h>
WINE_DEFAULT_DEBUG_CHANNEL(d3d);
WINE_DECLARE_DEBUG_CHANNEL(winediag);
@@ -247,6 +251,14 @@ BOOL wined3d_get_app_name(char *app_name, unsigned int app_name_size)
return TRUE;
}
+static void vkd3d_log_callback(const char *fmt, va_list args)
+{
+ char buffer[1024];
+
+ vsnprintf(buffer, sizeof(buffer), fmt, args);
+ __wine_dbg_output(buffer);
+}
+
static BOOL wined3d_dll_init(HINSTANCE hInstDLL)
{
DWORD wined3d_context_tls_idx;
@@ -459,6 +471,8 @@ static BOOL wined3d_dll_init(HINSTANCE hInstDLL)
if (appkey) RegCloseKey( appkey );
if (hkey) RegCloseKey( hkey );
+ vkd3d_set_log_callback(vkd3d_log_callback);
+
return TRUE;
}
More information about the wine-cvs
mailing list