From: Jason Ekstrand Date: Tue, 26 Jan 2016 19:48:07 +0000 (-0800) Subject: nir/lower_io: Lower INSTNACE_INDEX X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1c3b7fe1ee28a53b972859fce7384db965771ef0;p=mesa.git nir/lower_io: Lower INSTNACE_INDEX --- 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);