vkd3d-common: Remove an assertion in vkd3d_dbg_printf().

We want to get rid of assertions and only use the new VKD3D_ASSERT(),
but this cannot be done here, because a failing VKD3D_ASSERT() would
call back again to vkd3d_dbg_printf().

At the same time the asserted condition should be simple enough to
debug even without the assertion, since logging with a bad level
will likely result in either a crash or writing garbage to the log.
This commit is contained in:
Giovanni Mascellani 2024-07-29 22:40:54 +02:00 committed by Henri Verbeet
parent 2170fdc633
commit ba381497cc
Notes: Henri Verbeet 2024-07-30 16:38:27 +02:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/970

View File

@ -105,8 +105,6 @@ void vkd3d_dbg_printf(enum vkd3d_dbg_level level, const char *function, const ch
if (vkd3d_dbg_get_level() < level)
return;
assert(level < ARRAY_SIZE(debug_level_names));
#ifdef _WIN32
vkd3d_dbg_output("vkd3d:%04lx:%s:%s ", GetCurrentThreadId(), debug_level_names[level], function);
#elif HAVE_GETTID