summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2016-01-18 16:19:32 +0100
committerSamuel Pitoiset <[email protected]>2016-02-13 15:51:17 +0100
commit43f4420fba1c9855c0f127143a4ed13b170ac49b (patch)
treebb085857697775825f9a5cee758c6128925a2ad5
parentbfd695e1d2975e5dd5363c2e7fcc3084a28457aa (diff)
gallium: add indirect compute parameters to pipe_grid_info
Like indirect draw, we need to store a resource and an offset that needs to be 4 byte aligned. When indirect is used, the size of the grid (in blocks) is stored with three 32-bit integers. Changes from v2: - s/most values/block sizes/ Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
-rw-r--r--src/gallium/include/pipe/p_state.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h
index 5d0ebca1a3f..5209afe4ad6 100644
--- a/src/gallium/include/pipe/p_state.h
+++ b/src/gallium/include/pipe/p_state.h
@@ -704,6 +704,18 @@ struct pipe_grid_info
* Determine the layout of the grid (in block units) to be used.
*/
uint grid[3];
+
+ /* Indirect compute parameters resource: If not NULL, block sizes are taken
+ * from this buffer instead, which is laid out as follows:
+ *
+ * struct {
+ * uint32_t num_blocks_x;
+ * uint32_t num_blocks_y;
+ * uint32_t num_blocks_z;
+ * };
+ */
+ struct pipe_resource *indirect;
+ unsigned indirect_offset; /**< must be 4 byte aligned */
};
/**