glsl/enums: Add an enum for Vulkan instance index
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 26 Jan 2016 19:47:23 +0000 (11:47 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 26 Jan 2016 22:56:37 +0000 (14:56 -0800)
src/glsl/nir/shader_enums.c
src/glsl/nir/shader_enums.h

index 41da4a7b9ea519778cf6260c553135ca0b0f76e0..ff2f564dc986ce5d0dbea78c32dbc17fbcb5b9fc 100644 (file)
@@ -201,6 +201,7 @@ gl_system_value_name(gl_system_value sysval)
    static const char *names[] = {
      ENUM(SYSTEM_VALUE_VERTEX_ID),
      ENUM(SYSTEM_VALUE_INSTANCE_ID),
+     ENUM(SYSTEM_VALUE_INSTANCE_INDEX),
      ENUM(SYSTEM_VALUE_VERTEX_ID_ZERO_BASE),
      ENUM(SYSTEM_VALUE_BASE_VERTEX),
      ENUM(SYSTEM_VALUE_INVOCATION_ID),
index 3a06b14a46b417ffd37a317ccbfda8b92bfaea3e..e3f46e3d7394a323e3744a6c76835ef998532c22 100644 (file)
@@ -378,6 +378,13 @@ typedef enum
     */
    SYSTEM_VALUE_INSTANCE_ID,
 
+   /**
+    * Vulkan InstanceIndex.
+    *
+    * InstanceIndex = gl_InstanceID + gl_BaseInstance
+    */
+   SYSTEM_VALUE_INSTANCE_INDEX,
+
    /**
     * DirectX-style vertex ID.
     *