}
void
-iris_init_batch(struct iris_batch *batch,
- struct iris_screen *screen,
- struct pipe_debug_callback *dbg,
- struct pipe_device_reset_callback *reset,
- struct hash_table_u64 *state_sizes,
- struct iris_batch *all_batches,
+iris_init_batch(struct iris_context *ice,
enum iris_batch_name name,
int priority)
{
+ struct iris_batch *batch = &ice->batches[name];
+ struct iris_screen *screen = (void *) ice->ctx.screen;
+
batch->screen = screen;
- batch->dbg = dbg;
- batch->reset = reset;
- batch->state_sizes = state_sizes;
+ batch->dbg = &ice->dbg;
+ batch->reset = &ice->reset;
+ batch->state_sizes = ice->state.sizes;
batch->name = name;
batch->hw_ctx_id = iris_create_hw_context(screen->bufmgr);
memset(batch->other_batches, 0, sizeof(batch->other_batches));
for (int i = 0, j = 0; i < IRIS_BATCH_COUNT; i++) {
- if (&all_batches[i] != batch)
- batch->other_batches[j++] = &all_batches[i];
+ if (i != name)
+ batch->other_batches[j++] = &ice->batches[i];
}
if (unlikely(INTEL_DEBUG)) {
#include "iris_fence.h"
+struct iris_context;
+
/* The kernel assumes batchbuffers are smaller than 256kB. */
#define MAX_BATCH_SIZE (256 * 1024)
uint32_t last_aux_map_state;
};
-void iris_init_batch(struct iris_batch *batch,
- struct iris_screen *screen,
- struct pipe_debug_callback *dbg,
- struct pipe_device_reset_callback *reset,
- struct hash_table_u64 *state_sizes,
- struct iris_batch *all_batches,
+void iris_init_batch(struct iris_context *ice,
enum iris_batch_name name,
int priority);
void iris_chain_to_new_batch(struct iris_batch *batch);
ice->state.sizes = _mesa_hash_table_u64_create(ice);
for (int i = 0; i < IRIS_BATCH_COUNT; i++) {
- iris_init_batch(&ice->batches[i], screen, &ice->dbg,
- &ice->reset, ice->state.sizes,
- ice->batches, (enum iris_batch_name) i, priority);
+ iris_init_batch(ice, (enum iris_batch_name) i, priority);
}
screen->vtbl.init_render_context(&ice->batches[IRIS_BATCH_RENDER]);