iris: Unreference some more things on state module teardown
[mesa.git] / src / gallium / drivers / iris / iris_batch.h
index daa57fce6b5376a9f6e33c0443128c050fada5ea..d398c3c473e4abb0a6bab3b48cd56926b7938bb0 100644 (file)
 /* 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;
@@ -91,6 +96,9 @@ struct iris_batch {
    /** The amount of aperture space (in bytes) used by all exec_bos */
    int aperture_space;
 
+   /** A sync-point for the last batch that was submitted. */
+   struct iris_syncpt *last_syncpt;
+
    /** List of other batches which we might need to flush to use a BO */
    struct iris_batch *other_batches[IRIS_BATCH_COUNT - 1];
 
@@ -110,9 +118,6 @@ struct iris_batch {
       struct set *depth;
    } cache;
 
-   /** Map from batch offset to iris_alloc_state data (with DEBUG_BATCH) */
-   // XXX: unused
-   struct hash_table *state_sizes;
    struct gen_batch_decode_ctx decoder;
 
    /** Have we emitted any draw calls to this batch? */
@@ -123,8 +128,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);