Commit Graph

21 Commits

Author SHA1 Message Date
Hans-Kristian Arntzen b93963b6ce debug: Log thread ID as well.
For multi-threaded apps, this is vital to make any sense of the log.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-09-08 15:03:41 +02:00
Hans-Kristian Arntzen f0269739b1 debug: Add support for a log file.
Simplistic implementation. Also, make sure lines are written atomically
to not get garbled logs.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-10 16:09:00 +02:00
Hans-Kristian Arntzen 7fb97940f1 vkd3d: Initialize debug code once with pthread_once_t.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-10 16:09:00 +02:00
Hans-Kristian Arntzen 7f29d25611 debug: Flush logging output.
On Windows, we don't get a flush naturally after every newline,
so flush manually every time to make sure we get everything in a timely
fashion.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-10 16:09:00 +02:00
Hans-Kristian Arntzen 7bccab7427 debug: Re-introduce different debug channels.
vkd3d-shader is currently kinda buggy and crashes when you try to trace
DXBC. This used to never be run since it was guarded by
VKD3D_SHADER_DEBUG, but with the move to a static build we merged all
debug logging under VKD3D_DEBUG. Reintroduce different debug channels in
a way that is compatible with a statically linked vkd3d.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-10 14:18:15 +02:00
Joshua Ashton 4521b253dd vkd3d: Toss VKD3D_DEBUG_ENV_NAME
Creates linking problems if we want to build vkd3d-shader statically given this links back to something in vkd3d-common.

We don't need this distinction anyways...

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-06-24 15:18:56 +02:00
Józef Kucia 51b930192a vkd3d: Handle lists in debug env vars consistently.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-17 20:41:09 +02:00
Józef Kucia e7b94e0337 vkd3d: Enable Vulkan debug extensions independently of debug log level.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-01 22:54:23 +02:00
Józef Kucia 18f8019fd9 vkd3d-common: Explicitly limit value to UINT_MAX in vkd3d_env_var_as_uint().
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-08 19:39:34 +02:00
Józef Kucia 05666d3385 vkd3d: Add VKD3D_VULKAN_DEVICE debug environment variable.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-14 23:53:34 +01:00
Józef Kucia 52015b30b3 vkd3d-common: Add support for naming debug environment variable.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-31 18:05:53 +01:00
Józef Kucia f0a1e14113 libs/vkd3d: Mark device as removed when command list in recording state is executed.
Fixes a GPU hang in test_device_removed_reason() on RADV.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-16 21:59:57 +02:00
Henri Verbeet 3019a3e8f1 libs/vkd3d: Support both native and Win32 wchar_t. 2017-08-29 16:36:05 +02:00
Józef Kucia 252a2ea353 libs/vkd3d-common: Fix assert() condition. 2017-06-21 12:22:19 +02:00
Józef Kucia f7e738c27a libs/vkd3d-common: Terminate string with '\0' unconditionally in vkd3d_debug_sprintf(). 2017-06-21 12:22:19 +02:00
Józef Kucia 97c7bc0a18 libs/vkd3d-common: Provide access to current debug level. 2017-06-19 18:05:53 +02:00
Józef Kucia 7be0b64a0f libs/vkd3d-common: Add debugstr_a() function. 2017-06-16 22:38:21 +02:00
Józef Kucia 0e55ba8933 libs/vkd3d-common: Use ARRAY_SIZE() macro. 2017-06-16 22:38:21 +02:00
Józef Kucia 84889646f6 Update license to LGPL v2.1. 2017-06-16 22:11:21 +02:00
Józef Kucia ed033b40d0 libs/vkd3d: Fix InterlockedIncrement() and InterlockedDecrement() signatures. 2016-10-10 11:22:50 +02:00
Józef Kucia 49cac8005c libs/vkd3d-common: Add convenience library for shared code. 2016-10-07 13:26:39 +02:00
Renamed from libs/vkd3d/debug.c (Browse further)