vkd3d-shader/preproc: Store argument values per expansion, not per macro.

This commit is contained in:
Elizabeth Figura
2024-09-20 15:41:35 -05:00
committed by Henri Verbeet
parent e7c4867359
commit aa79bfa681
Notes: Henri Verbeet 2024-10-07 17:53:30 +02:00
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1147
4 changed files with 38 additions and 35 deletions

View File

@@ -60,6 +60,7 @@ struct preproc_expansion
{
struct preproc_buffer buffer;
const struct preproc_text *text;
struct preproc_text *arg_values;
/* Back-pointer to the macro, if this expansion a macro body. This is
* necessary so that argument tokens can be correctly replaced. */
struct preproc_macro *macro;
@@ -72,7 +73,6 @@ struct preproc_macro
char **arg_names;
size_t arg_count;
struct preproc_text *arg_values;
struct preproc_text body;
};
@@ -117,6 +117,7 @@ struct preproc_ctx
STATE_ARGS,
} state;
unsigned int paren_depth;
struct preproc_text *arg_values;
} text_func, directive_func;
int current_directive;