summaryrefslogtreecommitdiffstats
path: root/src/glsl/nir
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2016-01-26 11:48:07 -0800
committerJason Ekstrand <[email protected]>2016-01-26 14:56:37 -0800
commit1c3b7fe1ee28a53b972859fce7384db965771ef0 (patch)
treef1402dc53b89c663ab8b65144ced11d0dba0b074 /src/glsl/nir
parentb2b7c93318fa8d417f8d31beb3839c43bfbd894e (diff)
nir/lower_io: Lower INSTNACE_INDEX
Diffstat (limited to 'src/glsl/nir')
-rw-r--r--src/glsl/nir/nir_lower_system_values.c6
1 files changed, 6 insertions, 0 deletions
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);