nir: add support for user defined loop control

This will allow us to make use of the loop control support in
spirv and the GL support provided by EXT_control_flow_attributes.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108841
This commit is contained in:
Timothy Arceri
2019-03-20 13:39:36 +11:00
parent 6170814c42
commit b56451f82c
3 changed files with 22 additions and 5 deletions

View File

@@ -1968,12 +1968,19 @@ typedef struct {
struct list_head loop_terminator_list;
} nir_loop_info;
typedef enum {
nir_loop_control_none = 0x0,
nir_loop_control_unroll = 0x1,
nir_loop_control_dont_unroll = 0x2,
} nir_loop_control;
typedef struct {
nir_cf_node cf_node;
struct exec_list body; /** < list of nir_cf_node */
nir_loop_info *info;
nir_loop_control control;
bool partially_unrolled;
} nir_loop;