vkd3d-shader: Replace "parse_status" with a boolean variable.

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 14:38:46 -06:00
committed by Alexandre Julliard
parent 8313225cc6
commit 193218f54e
3 changed files with 5 additions and 22 deletions

View File

@@ -23,13 +23,6 @@
#include "vkd3d_shader_private.h"
#include "rbtree.h"
enum parse_status
{
PARSE_SUCCESS = 0,
PARSE_WARN = 1,
PARSE_ERR = 2
};
/* The general IR structure is inspired by Mesa GLSL hir, even though the code
* ends up being quite different in practice. Anyway, here comes the relevant
* licensing information.
@@ -396,8 +389,8 @@ struct hlsl_ctx
const char **source_files;
unsigned int source_files_count;
struct vkd3d_shader_location location;
enum parse_status status;
struct vkd3d_shader_message_context *message_context;
bool failed;
void *scanner;
@@ -501,14 +494,6 @@ static inline void hlsl_src_remove(struct hlsl_src *src)
src->node = NULL;
}
static inline void set_parse_status(enum parse_status *current, enum parse_status update)
{
if (update == PARSE_ERR)
*current = PARSE_ERR;
else if (update == PARSE_WARN && *current == PARSE_SUCCESS)
*current = PARSE_WARN;
}
const char *hlsl_base_type_to_string(const struct hlsl_type *type) DECLSPEC_HIDDEN;
const char *debug_hlsl_type(const struct hlsl_type *type) DECLSPEC_HIDDEN;
const char *hlsl_debug_modifiers(DWORD modifiers) DECLSPEC_HIDDEN;