aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/iris/iris_batch.h
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2018-11-20 09:00:22 -0800
committerKenneth Graunke <[email protected]>2019-02-21 10:26:10 -0800
commitf1a7392be17573169460971b487ad25cb2ce43df (patch)
treec77fc1e0687c6af4cfbfc500ebb765520315810b /src/gallium/drivers/iris/iris_batch.h
parentc2a77efa71f4b36708575652b89165745c4ad054 (diff)
iris: Put batches in an array
We keep re-making this array all over the place
Diffstat (limited to 'src/gallium/drivers/iris/iris_batch.h')
-rw-r--r--src/gallium/drivers/iris/iris_batch.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/gallium/drivers/iris/iris_batch.h b/src/gallium/drivers/iris/iris_batch.h
index cf119dd326a..32434e80749 100644
--- a/src/gallium/drivers/iris/iris_batch.h
+++ b/src/gallium/drivers/iris/iris_batch.h
@@ -39,6 +39,11 @@
/* Our target batch size - flush approximately at this point. */
#define BATCH_SZ (20 * 1024)
+enum iris_batch_name {
+ IRIS_BATCH_RENDER,
+ IRIS_BATCH_COMPUTE,
+};
+
#define IRIS_BATCH_COUNT 2
struct iris_address {
@@ -52,8 +57,8 @@ struct iris_batch {
struct iris_vtable *vtbl;
struct pipe_debug_callback *dbg;
- /** The name of this batch for debug info (e.g. "render") */
- const char *name;
+ /** What batch is this? (e.g. IRIS_BATCH_RENDER/COMPUTE) */
+ enum iris_batch_name name;
/** Current batchbuffer being queued up. */
struct iris_bo *bo;
@@ -126,8 +131,8 @@ void iris_init_batch(struct iris_batch *batch,
struct iris_screen *screen,
struct iris_vtable *vtbl,
struct pipe_debug_callback *dbg,
- struct iris_batch **other_batches,
- const char *name,
+ struct iris_batch *all_batches,
+ enum iris_batch_name name,
uint8_t ring);
void iris_chain_to_new_batch(struct iris_batch *batch);
void iris_batch_free(struct iris_batch *batch);