From e76ae39ae22ee21f83c41e80737979e9bc78cc15 Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Wed, 20 Mar 2019 15:42:56 +1100 Subject: 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 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108841 --- src/compiler/nir/nir.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/compiler/nir/nir.c') 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); -- cgit v1.2.3