vkd3d-shader: Implement hlsl_note().

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura
2021-02-21 22:04:38 -06:00
committed by Alexandre Julliard
parent 7069fa1c40
commit 87a371292d
3 changed files with 27 additions and 1 deletions

View File

@@ -144,6 +144,26 @@ bool vkd3d_shader_message_context_copy_messages(struct vkd3d_shader_message_cont
return true;
}
void vkd3d_shader_vnote(struct vkd3d_shader_message_context *context, const struct vkd3d_shader_location *location,
enum vkd3d_shader_log_level level, const char *format, va_list args)
{
if (context->log_level < level)
return;
if (location)
{
const char *source_name = location->source_name ? location->source_name : "<anonymous>";
if (location->line)
vkd3d_string_buffer_printf(&context->messages, "%s:%u:%u: ",
source_name, location->line, location->column);
else
vkd3d_string_buffer_printf(&context->messages, "%s: ", source_name);
}
vkd3d_string_buffer_vprintf(&context->messages, format, args);
vkd3d_string_buffer_printf(&context->messages, "\n");
}
void vkd3d_shader_vwarning(struct vkd3d_shader_message_context *context, const struct vkd3d_shader_location *location,
enum vkd3d_shader_error error, const char *format, va_list args)
{