diff options
author | Timothy Arceri <[email protected]> | 2019-03-20 15:42:56 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2019-03-27 02:39:12 +0000 |
commit | e76ae39ae22ee21f83c41e80737979e9bc78cc15 (patch) | |
tree | 9acada63c74e0885cba84b4f9befa70308d11f1c /src/compiler/nir/nir.c | |
parent | 24037ff22820efe23946dae5a9f8afb419a9c1eb (diff) |
nir: add support for user defined select control
This will allow us to make use of the selection control support in
spirv and the GL support provided by EXT_control_flow_attributes.
Note this only supports if-statements as we dont support switches
in NIR.
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108841
Diffstat (limited to 'src/compiler/nir/nir.c')
-rw-r--r-- | src/compiler/nir/nir.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/compiler/nir/nir.c b/src/compiler/nir/nir.c index 0daafc4936d..73645912897 100644 --- a/src/compiler/nir/nir.c +++ b/src/compiler/nir/nir.c @@ -365,6 +365,8 @@ nir_if_create(nir_shader *shader) { nir_if *if_stmt = ralloc(shader, nir_if); + if_stmt->control = nir_selection_control_none; + cf_init(&if_stmt->cf_node, nir_cf_node_if); src_init(&if_stmt->condition); |