summaryrefslogtreecommitdiffstats
path: root/src/glsl
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2016-01-26 11:47:23 -0800
committerJason Ekstrand <[email protected]>2016-01-26 14:56:37 -0800
commitb2b7c93318fa8d417f8d31beb3839c43bfbd894e (patch)
treef61ca5c390c164cfa6fc5024a467dda81d1567a8 /src/glsl
parentda75492879c7ba061720bf24c2755634a2cf7ef2 (diff)
glsl/enums: Add an enum for Vulkan instance index
Diffstat (limited to 'src/glsl')
-rw-r--r--src/glsl/nir/shader_enums.c1
-rw-r--r--src/glsl/nir/shader_enums.h7
2 files changed, 8 insertions, 0 deletions
diff --git a/src/glsl/nir/shader_enums.c b/src/glsl/nir/shader_enums.c
index 41da4a7b9ea..ff2f564dc98 100644
--- a/src/glsl/nir/shader_enums.c
+++ b/src/glsl/nir/shader_enums.c
@@ -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),
diff --git a/src/glsl/nir/shader_enums.h b/src/glsl/nir/shader_enums.h
index 3a06b14a46b..e3f46e3d739 100644
--- a/src/glsl/nir/shader_enums.h
+++ b/src/glsl/nir/shader_enums.h
@@ -379,6 +379,13 @@ typedef enum
SYSTEM_VALUE_INSTANCE_ID,
/**
+ * Vulkan InstanceIndex.
+ *
+ * InstanceIndex = gl_InstanceID + gl_BaseInstance
+ */
+ SYSTEM_VALUE_INSTANCE_INDEX,
+
+ /**
* DirectX-style vertex ID.
*
* Unlike \c SYSTEM_VALUE_VERTEX_ID, this system value does \b not include