summaryrefslogtreecommitdiffstats
path: root/src/gallium/include
diff options
context:
space:
mode:
authorChristoph Bumiller <[email protected]>2013-04-05 14:29:36 +0200
committerMarek Olšák <[email protected]>2014-07-02 00:47:09 +0200
commitbc198f8e63f8fa297a458892c1c51ba8808c73a5 (patch)
tree5f842e6f56746e9d49eaffe3e727cc2b6b8c8268 /src/gallium/include
parenta27b3582a60ac2be2b1d6594b042d2bb6438d81a (diff)
gallium: add facilities for indirect drawing
v2: Added comments to util_draw_indirect, clarified and fixed map size. Removed unlikely().
Diffstat (limited to 'src/gallium/include')
-rw-r--r--src/gallium/include/pipe/p_defines.h1
-rw-r--r--src/gallium/include/pipe/p_state.h22
2 files changed, 23 insertions, 0 deletions
diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h
index 0c958cf050a..166391d6988 100644
--- a/src/gallium/include/pipe/p_defines.h
+++ b/src/gallium/include/pipe/p_defines.h
@@ -561,6 +561,7 @@ enum pipe_cap {
PIPE_CAP_TEXTURE_GATHER_OFFSETS = 98,
PIPE_CAP_TGSI_VS_WINDOW_SPACE_POSITION = 99,
PIPE_CAP_MAX_VERTEX_STREAMS = 100,
+ PIPE_CAP_DRAW_INDIRECT = 101,
};
#define PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_NV50 (1 << 0)
diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h
index 6e6f88e6133..a82686b23a4 100644
--- a/src/gallium/include/pipe/p_state.h
+++ b/src/gallium/include/pipe/p_state.h
@@ -570,6 +570,28 @@ struct pipe_draw_info
* be set via set_vertex_buffers manually.
*/
struct pipe_stream_output_target *count_from_stream_output;
+
+ /* Indirect parameters resource: If not NULL, most values are taken
+ * from this buffer instead, which is laid out as follows:
+ *
+ * if indexed is TRUE:
+ * struct {
+ * uint32_t count;
+ * uint32_t instance_count;
+ * uint32_t start;
+ * int32_t index_bias;
+ * uint32_t start_instance;
+ * };
+ * otherwise:
+ * struct {
+ * uint32_t count;
+ * uint32_t instance_count;
+ * uint32_t start;
+ * uint32_t start_instance;
+ * };
+ */
+ struct pipe_resource *indirect;
+ unsigned indirect_offset; /**< must be 4 byte aligned */
};