When using PE vkd3d through Wine, debug output may be swallowed by writing to Win32 stderr. Avoid this by providing a way to hook up vkd3d log output to Wine output.
Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- include/private/vkd3d_debug.h | 1 + include/vkd3d_shader.h | 15 ++++++++++++++ include/vkd3d_types.h | 4 ++++ libs/vkd3d-common/debug.c | 28 +++++++++++++++++++++++++-- libs/vkd3d-shader/vkd3d_shader.map | 1 + libs/vkd3d-shader/vkd3d_shader_main.c | 5 +++++ 6 files changed, 52 insertions(+), 2 deletions(-)
diff --git a/include/private/vkd3d_debug.h b/include/private/vkd3d_debug.h index 8ab653aef..579c33d36 100644 --- a/include/private/vkd3d_debug.h +++ b/include/private/vkd3d_debug.h @@ -47,6 +47,7 @@ enum vkd3d_dbg_level enum vkd3d_dbg_level vkd3d_dbg_get_level(void);
void vkd3d_dbg_printf(enum vkd3d_dbg_level level, const char *function, const char *fmt, ...) VKD3D_PRINTF_FUNC(3, 4); +void vkd3d_dbg_set_log_callback(PFN_vkd3d_log callback);
const char *vkd3d_dbg_sprintf(const char *fmt, ...) VKD3D_PRINTF_FUNC(1, 2); const char *vkd3d_dbg_vsprintf(const char *fmt, va_list args); diff --git a/include/vkd3d_shader.h b/include/vkd3d_shader.h index 05d235f9d..1e5a332ef 100644 --- a/include/vkd3d_shader.h +++ b/include/vkd3d_shader.h @@ -1806,6 +1806,18 @@ VKD3D_SHADER_API void vkd3d_shader_free_shader_signature(struct vkd3d_shader_sig VKD3D_SHADER_API int vkd3d_shader_preprocess(const struct vkd3d_shader_compile_info *compile_info, struct vkd3d_shader_code *out, char **messages);
+/** + * Set a callback to be called when vkd3d-shader outputs debug logging. + * + * If NULL, or if this function has not been called, libvkd3d-shader will print + * all enabled log output to stderr. + * + * \param callback Callback function to set. + * + * \since 1.4 + */ +VKD3D_SHADER_API void vkd3d_shader_set_log_callback(PFN_vkd3d_log callback); + #endif /* VKD3D_SHADER_NO_PROTOTYPES */
/** Type of vkd3d_shader_get_version(). */ @@ -1859,6 +1871,9 @@ typedef void (*PFN_vkd3d_shader_free_shader_signature)(struct vkd3d_shader_signa typedef void (*PFN_vkd3d_shader_preprocess)(struct vkd3d_shader_compile_info *compile_info, struct vkd3d_shader_code *out, char **messages);
+/** Type of vkd3d_shader_set_log_callback(). \since 1.4 */ +typedef void (*PFN_vkd3d_shader_set_log_callback)(PFN_vkd3d_log callback); + #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/include/vkd3d_types.h b/include/vkd3d_types.h index 7014f4c25..4a7aca236 100644 --- a/include/vkd3d_types.h +++ b/include/vkd3d_types.h @@ -19,6 +19,8 @@ #ifndef __VKD3D_TYPES_H #define __VKD3D_TYPES_H
+#include <stdarg.h> + #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ @@ -53,6 +55,8 @@ enum vkd3d_result VKD3D_FORCE_32_BIT_ENUM(VKD3D_RESULT), };
+typedef void (*PFN_vkd3d_log)(const char *format, va_list args); + #ifdef _WIN32 # define VKD3D_IMPORT __declspec(dllimport) # define VKD3D_EXPORT __declspec(dllexport) diff --git a/libs/vkd3d-common/debug.c b/libs/vkd3d-common/debug.c index 4868f3fba..0b9e765ac 100644 --- a/libs/vkd3d-common/debug.c +++ b/libs/vkd3d-common/debug.c @@ -68,6 +68,25 @@ enum vkd3d_dbg_level vkd3d_dbg_get_level(void) return level; }
+static PFN_vkd3d_log log_callback; + +static void vkd3d_dbg_voutput(const char *fmt, va_list args) +{ + if (log_callback) + log_callback(fmt, args); + else + vfprintf(stderr, fmt, args); +} + +static void vkd3d_dbg_output(const char *fmt, ...) +{ + va_list args; + + va_start(args, fmt); + vkd3d_dbg_voutput(fmt, args); + va_end(args); +} + void vkd3d_dbg_printf(enum vkd3d_dbg_level level, const char *function, const char *fmt, ...) { va_list args; @@ -77,12 +96,17 @@ void vkd3d_dbg_printf(enum vkd3d_dbg_level level, const char *function, const ch
assert(level < ARRAY_SIZE(debug_level_names));
- fprintf(stderr, "%s:%s: ", debug_level_names[level], function); + vkd3d_dbg_output("%s:%s ", debug_level_names[level], function); va_start(args, fmt); - vfprintf(stderr, fmt, args); + vkd3d_dbg_voutput(fmt, args); va_end(args); }
+void vkd3d_dbg_set_log_callback(PFN_vkd3d_log callback) +{ + log_callback = callback; +} + static char *get_buffer(void) { static char buffers[VKD3D_DEBUG_BUFFER_COUNT][VKD3D_DEBUG_BUFFER_SIZE]; diff --git a/libs/vkd3d-shader/vkd3d_shader.map b/libs/vkd3d-shader/vkd3d_shader.map index 2e49fe248..cac96972a 100644 --- a/libs/vkd3d-shader/vkd3d_shader.map +++ b/libs/vkd3d-shader/vkd3d_shader.map @@ -17,6 +17,7 @@ global: vkd3d_shader_preprocess; vkd3d_shader_scan; vkd3d_shader_serialize_root_signature; + vkd3d_shader_set_log_callback;
local: *; }; diff --git a/libs/vkd3d-shader/vkd3d_shader_main.c b/libs/vkd3d-shader/vkd3d_shader_main.c index 6fd32435a..7d0157fca 100644 --- a/libs/vkd3d-shader/vkd3d_shader_main.c +++ b/libs/vkd3d-shader/vkd3d_shader_main.c @@ -1550,3 +1550,8 @@ int vkd3d_shader_preprocess(const struct vkd3d_shader_compile_info *compile_info vkd3d_shader_message_context_cleanup(&message_context); return ret; } + +void vkd3d_shader_set_log_callback(PFN_vkd3d_log callback) +{ + vkd3d_dbg_set_log_callback(callback); +}
When using PE vkd3d through Wine, debug output may be swallowed by writing to Win32 stderr. Avoid this by providing a way to hook up vkd3d log output to Wine output.
Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- include/vkd3d.h | 17 +++++++++++++++++ libs/vkd3d/vkd3d.map | 1 + libs/vkd3d/vkd3d_main.c | 6 ++++++ 3 files changed, 24 insertions(+)
diff --git a/include/vkd3d.h b/include/vkd3d.h index bce3c6e4b..f3c3fdc68 100644 --- a/include/vkd3d.h +++ b/include/vkd3d.h @@ -212,6 +212,20 @@ VKD3D_API HRESULT vkd3d_serialize_versioned_root_signature(const D3D12_VERSIONED VKD3D_API HRESULT vkd3d_create_versioned_root_signature_deserializer(const void *data, SIZE_T data_size, REFIID iid, void **deserializer);
+/** + * Set a callback to be called when vkd3d outputs debug logging. + * + * If NULL, or if this function has not been called, libvkd3d will print all + * enabled log output to stderr. + * + * Calling this function will also set the log callback for libvkd3d-shader. + * + * \param callback Callback function to set. + * + * \since 1.4 + */ +VKD3D_API void vkd3d_set_log_callback(PFN_vkd3d_log callback); + #endif /* VKD3D_NO_PROTOTYPES */
/* @@ -255,6 +269,9 @@ typedef HRESULT (*PFN_vkd3d_serialize_versioned_root_signature)(const D3D12_VERS typedef HRESULT (*PFN_vkd3d_create_versioned_root_signature_deserializer)(const void *data, SIZE_T data_size, REFIID iid, void **deserializer);
+/** Type of vkd3d_set_log_callback(). \since 1.4 */ +typedef void (*PFN_vkd3d_set_log_callback)(PFN_vkd3d_log callback); + #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/libs/vkd3d/vkd3d.map b/libs/vkd3d/vkd3d.map index 6f1f37611..441b2e35b 100644 --- a/libs/vkd3d/vkd3d.map +++ b/libs/vkd3d/vkd3d.map @@ -22,6 +22,7 @@ global: vkd3d_resource_incref; vkd3d_serialize_root_signature; vkd3d_serialize_versioned_root_signature; + vkd3d_set_log_callback;
local: *; }; diff --git a/libs/vkd3d/vkd3d_main.c b/libs/vkd3d/vkd3d_main.c index 21d998bf9..88301fbb3 100644 --- a/libs/vkd3d/vkd3d_main.c +++ b/libs/vkd3d/vkd3d_main.c @@ -510,3 +510,9 @@ HRESULT vkd3d_serialize_versioned_root_signature(const D3D12_VERSIONED_ROOT_SIGN } return hr; } + +void vkd3d_set_log_callback(PFN_vkd3d_log callback) +{ + vkd3d_shader_set_log_callback(callback); + vkd3d_dbg_set_log_callback(callback); +}
Signed-off-by: Giovanni Mascellani gmascellani@codeweavers.com
Il 02/06/22 02:01, Zebediah Figura ha scritto:
When using PE vkd3d through Wine, debug output may be swallowed by writing to Win32 stderr. Avoid this by providing a way to hook up vkd3d log output to Wine output.
Signed-off-by: Zebediah Figura zfigura@codeweavers.com
include/vkd3d.h | 17 +++++++++++++++++ libs/vkd3d/vkd3d.map | 1 + libs/vkd3d/vkd3d_main.c | 6 ++++++ 3 files changed, 24 insertions(+)
diff --git a/include/vkd3d.h b/include/vkd3d.h index bce3c6e4b..f3c3fdc68 100644 --- a/include/vkd3d.h +++ b/include/vkd3d.h @@ -212,6 +212,20 @@ VKD3D_API HRESULT vkd3d_serialize_versioned_root_signature(const D3D12_VERSIONED VKD3D_API HRESULT vkd3d_create_versioned_root_signature_deserializer(const void *data, SIZE_T data_size, REFIID iid, void **deserializer);
+/**
- Set a callback to be called when vkd3d outputs debug logging.
- If NULL, or if this function has not been called, libvkd3d will print all
- enabled log output to stderr.
- Calling this function will also set the log callback for libvkd3d-shader.
- \param callback Callback function to set.
- \since 1.4
- */
+VKD3D_API void vkd3d_set_log_callback(PFN_vkd3d_log callback);
#endif /* VKD3D_NO_PROTOTYPES */
/*
@@ -255,6 +269,9 @@ typedef HRESULT (*PFN_vkd3d_serialize_versioned_root_signature)(const D3D12_VERS typedef HRESULT (*PFN_vkd3d_create_versioned_root_signature_deserializer)(const void *data, SIZE_T data_size, REFIID iid, void **deserializer);
+/** Type of vkd3d_set_log_callback(). \since 1.4 */ +typedef void (*PFN_vkd3d_set_log_callback)(PFN_vkd3d_log callback);
- #ifdef __cplusplus } #endif /* __cplusplus */
diff --git a/libs/vkd3d/vkd3d.map b/libs/vkd3d/vkd3d.map index 6f1f37611..441b2e35b 100644 --- a/libs/vkd3d/vkd3d.map +++ b/libs/vkd3d/vkd3d.map @@ -22,6 +22,7 @@ global: vkd3d_resource_incref; vkd3d_serialize_root_signature; vkd3d_serialize_versioned_root_signature;
vkd3d_set_log_callback;
local: *; };
diff --git a/libs/vkd3d/vkd3d_main.c b/libs/vkd3d/vkd3d_main.c index 21d998bf9..88301fbb3 100644 --- a/libs/vkd3d/vkd3d_main.c +++ b/libs/vkd3d/vkd3d_main.c @@ -510,3 +510,9 @@ HRESULT vkd3d_serialize_versioned_root_signature(const D3D12_VERSIONED_ROOT_SIGN } return hr; }
+void vkd3d_set_log_callback(PFN_vkd3d_log callback) +{
- vkd3d_shader_set_log_callback(callback);
- vkd3d_dbg_set_log_callback(callback);
+}
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
When using PE vkd3d through Wine, debug output may be swallowed by writing to Win32 stderr. Avoid this by providing a way to hook up vkd3d log output to Wine output.
Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- include/vkd3d_utils.h | 15 +++++++++++++++ libs/vkd3d-utils/vkd3d_utils.map | 1 + libs/vkd3d-utils/vkd3d_utils_main.c | 6 ++++++ 3 files changed, 22 insertions(+)
diff --git a/include/vkd3d_utils.h b/include/vkd3d_utils.h index 565247820..6e84b176e 100644 --- a/include/vkd3d_utils.h +++ b/include/vkd3d_utils.h @@ -75,6 +75,21 @@ VKD3D_UTILS_API HRESULT WINAPI D3DPreprocess(const void *data, SIZE_T size, cons const D3D_SHADER_MACRO *defines, ID3DInclude *include, ID3DBlob **shader, ID3DBlob **error_messages);
+/** + * Set a callback to be called when vkd3d-utils outputs debug logging. + * + * If NULL, or if this function has not been called, libvkd3d-utils will print + * all enabled log output to stderr. + * + * Calling this function will also set the log callback for libvkd3d and + * libvkd3d-shader. + * + * \param callback Callback function to set. + * + * \since 1.4 + */ +VKD3D_UTILS_API void vkd3d_utils_set_log_callback(PFN_vkd3d_log callback); + #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/libs/vkd3d-utils/vkd3d_utils.map b/libs/vkd3d-utils/vkd3d_utils.map index 1e46cd865..14eb439e0 100644 --- a/libs/vkd3d-utils/vkd3d_utils.map +++ b/libs/vkd3d-utils/vkd3d_utils.map @@ -15,6 +15,7 @@ global: vkd3d_create_event; vkd3d_destroy_event; vkd3d_signal_event; + vkd3d_utils_set_log_callback; vkd3d_wait_event;
local: *; diff --git a/libs/vkd3d-utils/vkd3d_utils_main.c b/libs/vkd3d-utils/vkd3d_utils_main.c index 22953c461..644188930 100644 --- a/libs/vkd3d-utils/vkd3d_utils_main.c +++ b/libs/vkd3d-utils/vkd3d_utils_main.c @@ -536,3 +536,9 @@ HRESULT WINAPI D3DCreateBlob(SIZE_T data_size, ID3DBlob **blob) } return hr; } + +void vkd3d_utils_set_log_callback(PFN_vkd3d_log callback) +{ + vkd3d_set_log_callback(callback); + vkd3d_dbg_set_log_callback(callback); +}
Hi,
Il 02/06/22 02:01, Zebediah Figura ha scritto:
- Calling this function will also set the log callback for libvkd3d and
- libvkd3d-shader.
What's the reasoning behind the order in which log callbacks call each other? I.e., why, for example, libvkd3d-utils sets libvkd3d and not the other way around?
Thanks, Giovanni.
On 6/2/22 10:04, Giovanni Mascellani wrote:
Hi,
Il 02/06/22 02:01, Zebediah Figura ha scritto:
- Calling this function will also set the log callback for libvkd3d and
- libvkd3d-shader.
What's the reasoning behind the order in which log callbacks call each other? I.e., why, for example, libvkd3d-utils sets libvkd3d and not the other way around?
The libraries use one-way dependency chains, and the callbacks reflect that. libvkd3d-utils depends on libvkd3d and libvkd3d-shader; libvkd3d depends only on libvkd3d-shader; libvkd3d-shader is standalone.
libvkd3d-utils is not a utility library for libvkd3d, but a wrapper library to provide direct d3d12 entry points for the libvkd3d and libvkd3d-shader functions not otherwise exposed as d3d12 APIs. It also provides a few default callback functions meant to be used with libvkd3d APIs.
Signed-off-by: Giovanni Mascellani gmascellani@codeweavers.com
Il 02/06/22 02:01, Zebediah Figura ha scritto:
When using PE vkd3d through Wine, debug output may be swallowed by writing to Win32 stderr. Avoid this by providing a way to hook up vkd3d log output to Wine output.
Signed-off-by: Zebediah Figura zfigura@codeweavers.com
include/vkd3d_utils.h | 15 +++++++++++++++ libs/vkd3d-utils/vkd3d_utils.map | 1 + libs/vkd3d-utils/vkd3d_utils_main.c | 6 ++++++ 3 files changed, 22 insertions(+)
diff --git a/include/vkd3d_utils.h b/include/vkd3d_utils.h index 565247820..6e84b176e 100644 --- a/include/vkd3d_utils.h +++ b/include/vkd3d_utils.h @@ -75,6 +75,21 @@ VKD3D_UTILS_API HRESULT WINAPI D3DPreprocess(const void *data, SIZE_T size, cons const D3D_SHADER_MACRO *defines, ID3DInclude *include, ID3DBlob **shader, ID3DBlob **error_messages);
+/**
- Set a callback to be called when vkd3d-utils outputs debug logging.
- If NULL, or if this function has not been called, libvkd3d-utils will print
- all enabled log output to stderr.
- Calling this function will also set the log callback for libvkd3d and
- libvkd3d-shader.
- \param callback Callback function to set.
- \since 1.4
- */
+VKD3D_UTILS_API void vkd3d_utils_set_log_callback(PFN_vkd3d_log callback);
- #ifdef __cplusplus } #endif /* __cplusplus */
diff --git a/libs/vkd3d-utils/vkd3d_utils.map b/libs/vkd3d-utils/vkd3d_utils.map index 1e46cd865..14eb439e0 100644 --- a/libs/vkd3d-utils/vkd3d_utils.map +++ b/libs/vkd3d-utils/vkd3d_utils.map @@ -15,6 +15,7 @@ global: vkd3d_create_event; vkd3d_destroy_event; vkd3d_signal_event;
vkd3d_utils_set_log_callback; vkd3d_wait_event;
local: *;
diff --git a/libs/vkd3d-utils/vkd3d_utils_main.c b/libs/vkd3d-utils/vkd3d_utils_main.c index 22953c461..644188930 100644 --- a/libs/vkd3d-utils/vkd3d_utils_main.c +++ b/libs/vkd3d-utils/vkd3d_utils_main.c @@ -536,3 +536,9 @@ HRESULT WINAPI D3DCreateBlob(SIZE_T data_size, ID3DBlob **blob) } return hr; }
+void vkd3d_utils_set_log_callback(PFN_vkd3d_log callback) +{
- vkd3d_set_log_callback(callback);
- vkd3d_dbg_set_log_callback(callback);
+}
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Signed-off-by: Giovanni Mascellani gmascellani@codeweavers.com
Il 02/06/22 02:01, Zebediah Figura ha scritto:
When using PE vkd3d through Wine, debug output may be swallowed by writing to Win32 stderr. Avoid this by providing a way to hook up vkd3d log output to Wine output.
Signed-off-by: Zebediah Figura zfigura@codeweavers.com
include/private/vkd3d_debug.h | 1 + include/vkd3d_shader.h | 15 ++++++++++++++ include/vkd3d_types.h | 4 ++++ libs/vkd3d-common/debug.c | 28 +++++++++++++++++++++++++-- libs/vkd3d-shader/vkd3d_shader.map | 1 + libs/vkd3d-shader/vkd3d_shader_main.c | 5 +++++ 6 files changed, 52 insertions(+), 2 deletions(-)
diff --git a/include/private/vkd3d_debug.h b/include/private/vkd3d_debug.h index 8ab653aef..579c33d36 100644 --- a/include/private/vkd3d_debug.h +++ b/include/private/vkd3d_debug.h @@ -47,6 +47,7 @@ enum vkd3d_dbg_level enum vkd3d_dbg_level vkd3d_dbg_get_level(void);
void vkd3d_dbg_printf(enum vkd3d_dbg_level level, const char *function, const char *fmt, ...) VKD3D_PRINTF_FUNC(3, 4); +void vkd3d_dbg_set_log_callback(PFN_vkd3d_log callback);
const char *vkd3d_dbg_sprintf(const char *fmt, ...) VKD3D_PRINTF_FUNC(1, 2); const char *vkd3d_dbg_vsprintf(const char *fmt, va_list args); diff --git a/include/vkd3d_shader.h b/include/vkd3d_shader.h index 05d235f9d..1e5a332ef 100644 --- a/include/vkd3d_shader.h +++ b/include/vkd3d_shader.h @@ -1806,6 +1806,18 @@ VKD3D_SHADER_API void vkd3d_shader_free_shader_signature(struct vkd3d_shader_sig VKD3D_SHADER_API int vkd3d_shader_preprocess(const struct vkd3d_shader_compile_info *compile_info, struct vkd3d_shader_code *out, char **messages);
+/**
- Set a callback to be called when vkd3d-shader outputs debug logging.
- If NULL, or if this function has not been called, libvkd3d-shader will print
- all enabled log output to stderr.
- \param callback Callback function to set.
- \since 1.4
- */
+VKD3D_SHADER_API void vkd3d_shader_set_log_callback(PFN_vkd3d_log callback);
#endif /* VKD3D_SHADER_NO_PROTOTYPES */
/** Type of vkd3d_shader_get_version(). */
@@ -1859,6 +1871,9 @@ typedef void (*PFN_vkd3d_shader_free_shader_signature)(struct vkd3d_shader_signa typedef void (*PFN_vkd3d_shader_preprocess)(struct vkd3d_shader_compile_info *compile_info, struct vkd3d_shader_code *out, char **messages);
+/** Type of vkd3d_shader_set_log_callback(). \since 1.4 */ +typedef void (*PFN_vkd3d_shader_set_log_callback)(PFN_vkd3d_log callback);
- #ifdef __cplusplus } #endif /* __cplusplus */
diff --git a/include/vkd3d_types.h b/include/vkd3d_types.h index 7014f4c25..4a7aca236 100644 --- a/include/vkd3d_types.h +++ b/include/vkd3d_types.h @@ -19,6 +19,8 @@ #ifndef __VKD3D_TYPES_H #define __VKD3D_TYPES_H
+#include <stdarg.h>
- #ifdef __cplusplus extern "C" { #endif /* __cplusplus */
@@ -53,6 +55,8 @@ enum vkd3d_result VKD3D_FORCE_32_BIT_ENUM(VKD3D_RESULT), };
+typedef void (*PFN_vkd3d_log)(const char *format, va_list args);
- #ifdef _WIN32 # define VKD3D_IMPORT __declspec(dllimport) # define VKD3D_EXPORT __declspec(dllexport)
diff --git a/libs/vkd3d-common/debug.c b/libs/vkd3d-common/debug.c index 4868f3fba..0b9e765ac 100644 --- a/libs/vkd3d-common/debug.c +++ b/libs/vkd3d-common/debug.c @@ -68,6 +68,25 @@ enum vkd3d_dbg_level vkd3d_dbg_get_level(void) return level; }
+static PFN_vkd3d_log log_callback;
+static void vkd3d_dbg_voutput(const char *fmt, va_list args) +{
- if (log_callback)
log_callback(fmt, args);
- else
vfprintf(stderr, fmt, args);
+}
+static void vkd3d_dbg_output(const char *fmt, ...) +{
- va_list args;
- va_start(args, fmt);
- vkd3d_dbg_voutput(fmt, args);
- va_end(args);
+}
- void vkd3d_dbg_printf(enum vkd3d_dbg_level level, const char *function, const char *fmt, ...) { va_list args;
@@ -77,12 +96,17 @@ void vkd3d_dbg_printf(enum vkd3d_dbg_level level, const char *function, const ch
assert(level < ARRAY_SIZE(debug_level_names));
- fprintf(stderr, "%s:%s: ", debug_level_names[level], function);
- vkd3d_dbg_output("%s:%s ", debug_level_names[level], function); va_start(args, fmt);
- vfprintf(stderr, fmt, args);
- vkd3d_dbg_voutput(fmt, args); va_end(args); }
+void vkd3d_dbg_set_log_callback(PFN_vkd3d_log callback) +{
- log_callback = callback;
+}
- static char *get_buffer(void) { static char buffers[VKD3D_DEBUG_BUFFER_COUNT][VKD3D_DEBUG_BUFFER_SIZE];
diff --git a/libs/vkd3d-shader/vkd3d_shader.map b/libs/vkd3d-shader/vkd3d_shader.map index 2e49fe248..cac96972a 100644 --- a/libs/vkd3d-shader/vkd3d_shader.map +++ b/libs/vkd3d-shader/vkd3d_shader.map @@ -17,6 +17,7 @@ global: vkd3d_shader_preprocess; vkd3d_shader_scan; vkd3d_shader_serialize_root_signature;
vkd3d_shader_set_log_callback;
local: *; };
diff --git a/libs/vkd3d-shader/vkd3d_shader_main.c b/libs/vkd3d-shader/vkd3d_shader_main.c index 6fd32435a..7d0157fca 100644 --- a/libs/vkd3d-shader/vkd3d_shader_main.c +++ b/libs/vkd3d-shader/vkd3d_shader_main.c @@ -1550,3 +1550,8 @@ int vkd3d_shader_preprocess(const struct vkd3d_shader_compile_info *compile_info vkd3d_shader_message_context_cleanup(&message_context); return ret; }
+void vkd3d_shader_set_log_callback(PFN_vkd3d_log callback) +{
- vkd3d_dbg_set_log_callback(callback);
+}