mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/hlsl: Record semantic extern vars separately for each entry function.
This is required in order to process the entry point function and the patch constant function in hull shaders.
This commit is contained in:
Notes:
Henri Verbeet
2024-10-15 17:03:41 +02:00
Approved-by: Elizabeth Figura (@zfigura) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1154
@@ -611,6 +611,12 @@ struct hlsl_ir_function_decl
|
||||
* executed. Needed to deal with return statements in non-uniform control
|
||||
* flow, since some backends can't handle them. */
|
||||
struct hlsl_ir_var *early_return_var;
|
||||
|
||||
/* List of all the extern semantic variables; linked by the
|
||||
* hlsl_ir_var.extern_entry fields. This exists as a convenience because
|
||||
* it is often necessary to iterate all extern variables and these can be
|
||||
* declared in as function parameters, or as the function return value. */
|
||||
struct list extern_vars;
|
||||
};
|
||||
|
||||
struct hlsl_ir_call
|
||||
@@ -1019,10 +1025,11 @@ struct hlsl_ctx
|
||||
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.
|
||||
* This exists as a convenience because it is often necessary to iterate all extern variables
|
||||
* and these can be declared in global scope, as function parameters, or as the function
|
||||
* return value. */
|
||||
|
||||
/* List of all the extern variables, excluding semantic variables; linked
|
||||
* by the hlsl_ir_var.extern_entry fields. This exists as a convenience
|
||||
* because it is often necessary to iterate all extern variables declared
|
||||
* in the global scope or as function parameters. */
|
||||
struct list extern_vars;
|
||||
|
||||
/* List containing both the built-in HLSL buffers ($Globals and $Params) and the ones declared
|
||||
|
Reference in New Issue
Block a user