mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d: Introduce debug severity MESSAGE.
That's intended for messages that it's pretty important that the user receives, but that are not proper error messages.
This commit is contained in:
parent
021a7f030a
commit
a484063cd2
Notes:
Henri Verbeet
2024-07-29 13:23:46 +02:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Conor McCarthy (@cmccarthy) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/867
@ -128,11 +128,13 @@ VKD3D_NORETURN static inline void vkd3d_unreachable_(const char *filename, unsig
|
||||
|
||||
#ifdef VKD3D_NO_ERROR_MESSAGES
|
||||
#define ERR(args...) do { } while (0)
|
||||
#define MESSAGE(args...) do { } while (0)
|
||||
#endif
|
||||
|
||||
enum vkd3d_dbg_level
|
||||
{
|
||||
VKD3D_DBG_LEVEL_NONE,
|
||||
VKD3D_DBG_LEVEL_MESSAGE,
|
||||
VKD3D_DBG_LEVEL_ERR,
|
||||
VKD3D_DBG_LEVEL_FIXME,
|
||||
VKD3D_DBG_LEVEL_WARN,
|
||||
@ -182,6 +184,10 @@ const char *debugstr_w(const WCHAR *wstr, size_t wchar_size);
|
||||
#define ERR VKD3D_DBG_LOG(ERR)
|
||||
#endif
|
||||
|
||||
#ifndef MESSAGE
|
||||
#define MESSAGE VKD3D_DBG_LOG(MESSAGE)
|
||||
#endif
|
||||
|
||||
#ifndef TRACE_ON
|
||||
#define TRACE_ON() (vkd3d_dbg_get_level() == VKD3D_DBG_LEVEL_TRACE)
|
||||
#endif
|
||||
|
@ -46,6 +46,7 @@ extern const char *const vkd3d_dbg_env_name;
|
||||
static const char *const debug_level_names[] =
|
||||
{
|
||||
[VKD3D_DBG_LEVEL_NONE ] = "none",
|
||||
[VKD3D_DBG_LEVEL_MESSAGE] = "message",
|
||||
[VKD3D_DBG_LEVEL_ERR ] = "err",
|
||||
[VKD3D_DBG_LEVEL_FIXME] = "fixme",
|
||||
[VKD3D_DBG_LEVEL_WARN ] = "warn",
|
||||
|
@ -10541,7 +10541,7 @@ int dxil_parse(const struct vkd3d_shader_compile_info *compile_info, uint64_t co
|
||||
uint32_t *byte_code = NULL;
|
||||
int ret;
|
||||
|
||||
ERR("Creating a DXIL parser. This is unsupported; you get to keep all the pieces if it breaks.\n");
|
||||
MESSAGE("Creating a DXIL parser. This is unsupported; you get to keep all the pieces if it breaks.\n");
|
||||
|
||||
dxbc_desc.is_dxil = true;
|
||||
if ((ret = shader_extract_from_dxbc(&compile_info->source, message_context, compile_info->source_name,
|
||||
|
@ -97,7 +97,7 @@ static int vkd3d_glsl_generator_generate(struct vkd3d_glsl_generator *gen, struc
|
||||
unsigned int i;
|
||||
void *code;
|
||||
|
||||
ERR("Generating a GLSL shader. This is unsupported; you get to keep all the pieces if it breaks.\n");
|
||||
MESSAGE("Generating a GLSL shader. This is unsupported; you get to keep all the pieces if it breaks.\n");
|
||||
|
||||
vkd3d_string_buffer_printf(buffer, "#version 440\n\n");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user