nir/spirv: Add proper support for InstanceIndex
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 26 Jan 2016 19:48:23 +0000 (11:48 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 26 Jan 2016 22:56:37 +0000 (14:56 -0800)
src/glsl/nir/spirv/vtn_variables.c

index 8fea43b2e965a701c92a0dd686ec915f742e7a94..dd006c355d93e6f52a9041d15123d7e2c84d40a0 100644 (file)
@@ -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);