gallium: add baseinstance/drawid semantics
authorIlia Mirkin <imirkin@alum.mit.edu>
Tue, 29 Dec 2015 21:37:19 +0000 (16:37 -0500)
committerIlia Mirkin <imirkin@alum.mit.edu>
Wed, 30 Dec 2015 21:55:56 +0000 (16:55 -0500)
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
src/gallium/auxiliary/tgsi/tgsi_strings.c
src/gallium/docs/source/tgsi.rst
src/gallium/include/pipe/p_shader_tokens.h

index fc29a2398aacd14f5997fc267de32eea684a391d..fd926b37c4782e2de2262a85eaa4cfb9f5cd6915 100644 (file)
@@ -96,6 +96,8 @@ const char *tgsi_semantic_names[TGSI_SEMANTIC_COUNT] =
    "TESSINNER",
    "VERTICESIN",
    "HELPER_INVOCATION",
+   "BASEINSTANCE",
+   "DRAWID",
 };
 
 const char *tgsi_texture_names[TGSI_TEXTURE_COUNT] =
index e7b0c2f6377e236e36bc334b358ea8e422f0c00d..955ece89da5202acc2d48f026675f6181178373f 100644 (file)
@@ -2949,6 +2949,19 @@ invocation is covered or not. Helper invocations are created in order
 to properly compute derivatives, however it may be desirable to skip
 some of the logic in those cases. See ``gl_HelperInvocation`` documentation.
 
+TGSI_SEMANTIC_BASEINSTANCE
+""""""""""""""""""""""""""
+
+For vertex shaders, the base instance argument supplied for this
+draw. This is an integer value, and only the X component is used.
+
+TGSI_SEMANTIC_DRAWID
+""""""""""""""""""""
+
+For vertex shaders, the zero-based index of the current draw in a
+``glMultiDraw*`` invocation. This is an integer value, and only the X
+component is used.
+
 
 Declaration Interpolate
 ^^^^^^^^^^^^^^^^^^^^^^^
index a3137aec8db6c0f1c91394831eebe7b4121a1409..e8f4ad210e10f6c555742a46eb7b638e02ab4ca7 100644 (file)
@@ -186,7 +186,9 @@ struct tgsi_declaration_interp
 #define TGSI_SEMANTIC_TESSINNER  33 /**< inner tessellation levels */
 #define TGSI_SEMANTIC_VERTICESIN 34 /**< number of input vertices */
 #define TGSI_SEMANTIC_HELPER_INVOCATION 35 /**< current invocation is helper */
-#define TGSI_SEMANTIC_COUNT      36 /**< number of semantic values */
+#define TGSI_SEMANTIC_BASEINSTANCE 36
+#define TGSI_SEMANTIC_DRAWID     37
+#define TGSI_SEMANTIC_COUNT      38 /**< number of semantic values */
 
 struct tgsi_declaration_semantic
 {