summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2015-12-31 13:07:49 -0500
committerIlia Mirkin <[email protected]>2016-01-07 18:38:46 -0500
commit3e11656694857edcc98945da1a7eef40f3ba3836 (patch)
tree28528494436d0c60187117e29eba479c9645d48e
parent60d0cfd4298d12d004e5f07ee5f94661ce0cc80f (diff)
gallium: add sufficient draw interface to allow new indirect features
This makes it possible to support indirect multidraws as well as having the number of such draws to come from a separate GPU resource. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
-rw-r--r--src/gallium/include/pipe/p_state.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h
index 84633633f55..2e4d2830199 100644
--- a/src/gallium/include/pipe/p_state.h
+++ b/src/gallium/include/pipe/p_state.h
@@ -620,7 +620,7 @@ struct pipe_draw_info
*/
struct pipe_stream_output_target *count_from_stream_output;
- /* Indirect parameters resource: If not NULL, most values are taken
+ /* Indirect draw parameters resource: If not NULL, most values are taken
* from this buffer instead, which is laid out as follows:
*
* if indexed is TRUE:
@@ -641,6 +641,15 @@ struct pipe_draw_info
*/
struct pipe_resource *indirect;
unsigned indirect_offset; /**< must be 4 byte aligned */
+ unsigned indirect_stride; /**< must be 4 byte aligned */
+ unsigned indirect_count; /**< number of indirect draws */
+
+ /* Indirect draw count resource: If not NULL, contains a 32-bit value which
+ * is to be used as the real indirect_count. In that case indirect_count
+ * becomes the maximum possible value.
+ */
+ struct pipe_resource *indirect_params;
+ unsigned indirect_params_offset; /**< must be 4 byte aligned */
};