From 6ba67795db924832c1a209d1466abfa13d9d68d5 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Tue, 26 Jan 2016 11:48:23 -0800 Subject: [PATCH] nir/spirv: Add proper support for InstanceIndex --- src/glsl/nir/spirv/vtn_variables.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/glsl/nir/spirv/vtn_variables.c b/src/glsl/nir/spirv/vtn_variables.c index 8fea43b2e96..dd006c355d9 100644 --- a/src/glsl/nir/spirv/vtn_variables.c +++ b/src/glsl/nir/spirv/vtn_variables.c @@ -784,7 +784,9 @@ vtn_get_builtin_location(struct vtn_builder *b, set_mode_system_value(mode); break; case SpvBuiltInInstanceIndex: - /* XXX */ + *location = SYSTEM_VALUE_INSTANCE_INDEX; + set_mode_system_value(mode); + break; case SpvBuiltInInstanceId: *location = SYSTEM_VALUE_INSTANCE_ID; set_mode_system_value(mode); -- 2.30.2