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 <bas@basnieuwenhuizen.nl>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108841
This commit is contained in:
Timothy Arceri
2019-03-20 15:42:56 +11:00
parent 24037ff228
commit e76ae39ae2
4 changed files with 21 additions and 1 deletions
+1
View File
@@ -537,6 +537,7 @@ static nir_if *
clone_if(clone_state *state, struct exec_list *cf_list, const nir_if *i)
{
nir_if *ni = nir_if_create(state->ns);
ni->control = i->control;
__clone_src(state, ni, &ni->condition, &i->condition);