mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-04-13 05:43:18 -07:00
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:
parent
df3773ff7e
commit
28b1d68ce3
@ -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)
|
||||
|
@ -568,8 +568,13 @@ struct hlsl_ir_var *hlsl_new_var(const char *name, struct hlsl_type *type, const
|
||||
struct hlsl_ir_load *hlsl_new_var_load(struct hlsl_ir_var *var, const struct source_location loc) DECLSPEC_HIDDEN;
|
||||
|
||||
void hlsl_message(const char *fmt, ...) VKD3D_PRINTF_FUNC(1,2) DECLSPEC_HIDDEN;
|
||||
void hlsl_report_message(struct hlsl_ctx *ctx, const struct source_location loc,
|
||||
enum hlsl_error_level level, const char *fmt, ...) VKD3D_PRINTF_FUNC(4, 5) DECLSPEC_HIDDEN;
|
||||
|
||||
void hlsl_error(struct hlsl_ctx *ctx, const struct source_location loc,
|
||||
const char *fmt, ...) VKD3D_PRINTF_FUNC(3, 4) DECLSPEC_HIDDEN;
|
||||
void hlsl_warning(struct hlsl_ctx *ctx, const struct source_location loc,
|
||||
const char *fmt, ...) VKD3D_PRINTF_FUNC(3, 4) DECLSPEC_HIDDEN;
|
||||
void hlsl_note(struct hlsl_ctx *ctx, const struct source_location loc, enum vkd3d_shader_log_level level,
|
||||
const char *fmt, ...) VKD3D_PRINTF_FUNC(4, 5) DECLSPEC_HIDDEN;
|
||||
|
||||
void hlsl_push_scope(struct hlsl_ctx *ctx) DECLSPEC_HIDDEN;
|
||||
void hlsl_pop_scope(struct hlsl_ctx *ctx) DECLSPEC_HIDDEN;
|
||||
|
@ -65,8 +65,7 @@ ANY (.)
|
||||
{RESERVED4} {
|
||||
struct hlsl_ctx *ctx = yyget_extra(yyscanner);
|
||||
|
||||
hlsl_report_message(ctx, *yylloc, HLSL_LEVEL_ERROR,
|
||||
"Reserved keyword \"%s\" used.\n", yytext);
|
||||
hlsl_error(ctx, *yylloc, "Reserved keyword \"%s\" used.\n", yytext);
|
||||
}
|
||||
|
||||
BlendState {return KW_BLENDSTATE; }
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user