vkd3d-shader/hlsl: Put synthetic variables into a dummy scope.

Prevent them from being ever looked up.

Our naming scheme for synthetic variables already effectively prevents this, but
this is better for clarity. We also will need to be able to move some named
variables into a dummy scope to account for complexities around function
definition and declarations.
This commit is contained in:
Zebediah Figura
2023-01-31 22:18:35 -06:00
committed by Alexandre Julliard
parent 8755a92196
commit 25d49b518d
Notes: Alexandre Julliard 2023-02-07 22:15:32 +01:00
Approved-by: Francisco Casas (@fcasas)
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/77
2 changed files with 25 additions and 6 deletions

View File

@@ -698,6 +698,8 @@ struct hlsl_ctx
struct hlsl_scope *cur_scope;
/* Scope of global variables. */
struct hlsl_scope *globals;
/* Dummy scope for variables which should never be looked up by name. */
struct hlsl_scope *dummy_scope;
/* List of all the scopes in the program; linked by the hlsl_scope.entry fields. */
struct list scopes;
/* List of all the extern variables; linked by the hlsl_ir_var.extern_entry fields.