vkd3d-shader/hlsl: Store the internal name counter in struct hlsl_ctx.

This is minutely more efficient than using a global variable and atomic instructions.
This commit is contained in:
Zebediah Figura
2023-08-29 16:50:13 -05:00
committed by Alexandre Julliard
parent f22e52f358
commit d396c4ce27
Notes: Alexandre Julliard 2023-08-30 23:19:43 +02:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/310
2 changed files with 4 additions and 2 deletions

View File

@@ -798,6 +798,9 @@ struct hlsl_ctx
/* Pointer to the current function; changes as the parser reads the code. */
const struct hlsl_ir_function_decl *cur_function;
/* Counter for generating unique internal variable names. */
unsigned int internal_name_counter;
/* Default matrix majority for matrix types. Can be set by a pragma within the HLSL source. */
unsigned int matrix_majority;