mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/hlsl: Factor out an hlsl_block structure.
This doesn't hold anything other than a list, nor do I have any immediate plans for it to hold anything other than a list, but I'm adding it for some degree of clarity. Passing around untyped list pointers is not my favourite hobby. Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Matteo Bruni <mbruni@codeweavers.com> Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
committed by
Alexandre Julliard
parent
8485a7c450
commit
182707f168
@@ -189,6 +189,11 @@ struct hlsl_ir_node
|
||||
struct hlsl_reg reg;
|
||||
};
|
||||
|
||||
struct hlsl_block
|
||||
{
|
||||
struct list instrs;
|
||||
};
|
||||
|
||||
struct hlsl_src
|
||||
{
|
||||
struct hlsl_ir_node *node;
|
||||
@@ -258,7 +263,7 @@ struct hlsl_ir_function_decl
|
||||
struct rb_entry entry;
|
||||
struct hlsl_ir_function *func;
|
||||
struct list *parameters;
|
||||
struct list body;
|
||||
struct hlsl_block body;
|
||||
bool has_body;
|
||||
};
|
||||
|
||||
@@ -266,15 +271,15 @@ struct hlsl_ir_if
|
||||
{
|
||||
struct hlsl_ir_node node;
|
||||
struct hlsl_src condition;
|
||||
struct list then_instrs;
|
||||
struct list else_instrs;
|
||||
struct hlsl_block then_instrs;
|
||||
struct hlsl_block else_instrs;
|
||||
};
|
||||
|
||||
struct hlsl_ir_loop
|
||||
{
|
||||
struct hlsl_ir_node node;
|
||||
/* loop condition is stored in the body (as "if (!condition) break;") */
|
||||
struct list body;
|
||||
struct hlsl_block body;
|
||||
unsigned int next_index; /* liveness index of the end of the loop */
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user