vkd3d-shader: Separate hlsl_report_message() into helpers for individual log levels.

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-12 10:48:54 -06:00
committed by Alexandre Julliard
parent df3773ff7e
commit 28b1d68ce3
4 changed files with 91 additions and 84 deletions

View File

@@ -25,15 +25,24 @@ void hlsl_message(const char *fmt, ...)
/* FIXME */
}
void hlsl_report_message(struct hlsl_ctx *ctx, const struct source_location loc,
enum hlsl_error_level level, const char *fmt, ...)
void hlsl_note(struct hlsl_ctx *ctx, const struct source_location loc,
enum vkd3d_shader_log_level level, const char *fmt, ...)
{
/* FIXME */
}
void hlsl_error(struct hlsl_ctx *ctx, const struct source_location loc, const char *fmt, ...)
{
/* FIXME */
if (level == HLSL_LEVEL_ERROR)
set_parse_status(&ctx->status, PARSE_ERR);
else if (level == HLSL_LEVEL_WARNING)
set_parse_status(&ctx->status, PARSE_WARN);
set_parse_status(&ctx->status, PARSE_ERR);
}
void hlsl_warning(struct hlsl_ctx *ctx, const struct source_location loc, const char *fmt, ...)
{
/* FIXME */
set_parse_status(&ctx->status, PARSE_WARN);
}
bool hlsl_add_var(struct hlsl_ctx *ctx, struct hlsl_ir_var *decl, bool local_var)