summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_lower_system_values.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/nir/nir_lower_system_values.c')
-rw-r--r--src/compiler/nir/nir_lower_system_values.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_lower_system_values.c b/src/compiler/nir/nir_lower_system_values.c
index 810100a0816..ba20d3083f1 100644
--- a/src/compiler/nir/nir_lower_system_values.c
+++ b/src/compiler/nir/nir_lower_system_values.c
@@ -116,6 +116,20 @@ convert_block(nir_block *block, nir_builder *b)
nir_load_base_instance(b));
break;
+ case SYSTEM_VALUE_SUBGROUP_EQ_MASK:
+ case SYSTEM_VALUE_SUBGROUP_GE_MASK:
+ case SYSTEM_VALUE_SUBGROUP_GT_MASK:
+ case SYSTEM_VALUE_SUBGROUP_LE_MASK:
+ case SYSTEM_VALUE_SUBGROUP_LT_MASK: {
+ nir_intrinsic_op op =
+ nir_intrinsic_from_system_value(var->data.location);
+ nir_intrinsic_instr *load = nir_intrinsic_instr_create(b->shader, op);
+ nir_ssa_dest_init(&load->instr, &load->dest, 1, 64, NULL);
+ nir_builder_instr_insert(b, &load->instr);
+ sysval = &load->dest.ssa;
+ break;
+ }
+
default:
break;
}