Francisco Casas : vkd3d-shader/hlsl: Split declare_vars().
Module: vkd3d Branch: master Commit: a34cf2e64e6c5c534b810ebb74dfb3da1458474c URL: https://gitlab.winehq.org/wine/vkd3d/-/commit/a34cf2e64e6c5c534b810ebb74dfb3... Author: Francisco Casas <fcasas(a)codeweavers.com> Date: Mon Jun 26 14:50:16 2023 -0400 vkd3d-shader/hlsl: Split declare_vars(). Basically, declare_vars() is separated in three functions: 1. check_invalid_in_out_modifiers(), which is to be called once per declaration and emits an error when in or out modifiers are used for these non-parameter variables. 2. declare_var(), which now handles one variable at the time and doesn't free any memory. 3. initialize_vars(), which takes care of preparing the initialization instructions of several variables and frees their struct parse_variable_def, using exclusively free_parse_variable_def(). This allows to declare variables individually before the initializer of the next variable in the same declaration is parsed, which is used in the following patches. Also, simplifies memory management. --- libs/vkd3d-shader/hlsl.y | 388 ++++++++++++++++++++++++++--------------------- 1 file changed, 218 insertions(+), 170 deletions(-)
participants (1)
-
Alexandre Julliard