From 1c3b7fe1ee28a53b972859fce7384db965771ef0 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Tue, 26 Jan 2016 11:48:07 -0800 Subject: [PATCH] nir/lower_io: Lower INSTNACE_INDEX --- src/glsl/nir/nir_lower_system_values.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/glsl/nir/nir_lower_system_values.c b/src/glsl/nir/nir_lower_system_values.c index aeaa3107c1f..79f6bedc990 100644 --- a/src/glsl/nir/nir_lower_system_values.c +++ b/src/glsl/nir/nir_lower_system_values.c @@ -113,6 +113,12 @@ convert_block(nir_block *block, void *void_state) } break; + case SYSTEM_VALUE_INSTANCE_INDEX: + sysval = nir_iadd(b, + nir_load_system_value(b, nir_intrinsic_load_instance_id, 0), + nir_load_system_value(b, nir_intrinsic_load_base_instance, 0)); + break; + default: { nir_intrinsic_op sysval_op = nir_intrinsic_from_system_value(var->data.location); -- 2.30.2