vkd3d-shader/ir: Flatten IF/ELSE/ENDIF control flow instructions.

This commit is contained in:
Conor McCarthy
2024-01-05 00:55:51 +10:00
committed by Alexandre Julliard
parent f3d464de0e
commit e1dddc01b7
Notes: Alexandre Julliard 2024-01-17 22:42:55 +01:00
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/450
4 changed files with 452 additions and 88 deletions

View File

@@ -238,6 +238,7 @@ enum vkd3d_shader_opcode
VKD3DSIH_BEM,
VKD3DSIH_BFI,
VKD3DSIH_BFREV,
VKD3DSIH_BRANCH,
VKD3DSIH_BREAK,
VKD3DSIH_BREAKC,
VKD3DSIH_BREAKP,
@@ -1016,6 +1017,7 @@ struct vkd3d_shader_desc
uint32_t temp_count;
unsigned int ssa_count;
unsigned int block_count;
struct
{
@@ -1185,6 +1187,11 @@ static inline bool register_is_constant(const struct vkd3d_shader_register *reg)
return (reg->type == VKD3DSPR_IMMCONST || reg->type == VKD3DSPR_IMMCONST64);
}
static inline bool vsir_register_is_label(const struct vkd3d_shader_register *reg)
{
return reg->type == VKD3DSPR_LABEL;
}
struct vkd3d_shader_param_node
{
struct vkd3d_shader_param_node *next;