Otherwise state might leak to the next preprocessed shader.
Signed-off-by: Matteo Bruni mbruni@codeweavers.com --- dlls/d3dcompiler_43/compiler.c | 1 + dlls/d3dcompiler_43/wpp_private.h | 1 + 2 files changed, 2 insertions(+)
diff --git a/dlls/d3dcompiler_43/compiler.c b/dlls/d3dcompiler_43/compiler.c index d4523edb99c..b75a1d0a6a5 100644 --- a/dlls/d3dcompiler_43/compiler.c +++ b/dlls/d3dcompiler_43/compiler.c @@ -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(); diff --git a/dlls/d3dcompiler_43/wpp_private.h b/dlls/d3dcompiler_43/wpp_private.h index 325c7f1e510..3b6d947d8a8 100644 --- a/dlls/d3dcompiler_43/wpp_private.h +++ b/dlls/d3dcompiler_43/wpp_private.h @@ -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);