vkd3d-shader/hlsl: Lower return statements.

This commit is contained in:
Zebediah Figura
2021-09-13 23:08:34 -05:00
committed by Alexandre Julliard
parent 0cf39f3c63
commit 8bdee6681b
Notes: Alexandre Julliard 2023-02-13 22:20:34 +01:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Francisco Casas (@fcasas)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/85
5 changed files with 236 additions and 7 deletions

View File

@@ -429,6 +429,11 @@ struct hlsl_ir_function_decl
* Not to be confused with the function parameters! */
unsigned int attr_count;
const struct hlsl_attribute *const *attrs;
/* Synthetic boolean variable marking whether a return statement has been
* 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;
};
struct hlsl_ir_call