mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-04-13 05:43:18 -07:00
vkd3d-shader: Allow writing log output via a custom 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> Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
committed by
Alexandre Julliard
parent
6ff6cb4ed2
commit
174172887b
@@ -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 */
|
||||
|
Reference in New Issue
Block a user