d3dcompiler: Clear preprocessor lexer state after running it.

Otherwise state might leak to the next preprocessed shader.

Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Matteo Bruni 2021-09-08 12:49:02 +02:00 committed by Alexandre Julliard
parent 72d6654c73
commit 450d435306
2 changed files with 2 additions and 0 deletions

View file

@ -475,6 +475,7 @@ int wpp_parse( const char *input, FILE *output )
}
/* Clean if_stack, it could remain dirty on errors */
while (pp_get_if_depth()) pp_pop_if();
ppy_lex_destroy();
del_special_defines();
del_cmdline_defines();
pp_pop_define_state();

View file

@ -235,6 +235,7 @@ extern includelogicentry_t *pp_includelogiclist;
extern FILE *ppy_out;
extern char *ppy_text;
int ppy_lex(void);
int ppy_lex_destroy(void);
void pp_do_include(char *fname, int type);
void pp_push_ignore_state(void);