iris: Add iris_init_batches
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12692>
This commit is contained in:
@@ -173,7 +173,7 @@ decode_batch(struct iris_batch *batch)
|
|||||||
batch->exec_bos[0]->address, false);
|
batch->exec_bos[0]->address, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
iris_init_batch(struct iris_context *ice,
|
iris_init_batch(struct iris_context *ice,
|
||||||
enum iris_batch_name name,
|
enum iris_batch_name name,
|
||||||
int priority)
|
int priority)
|
||||||
@@ -240,6 +240,14 @@ iris_init_batch(struct iris_context *ice,
|
|||||||
iris_batch_reset(batch);
|
iris_batch_reset(batch);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
iris_init_batches(struct iris_context *ice, int priority)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < IRIS_BATCH_COUNT; i++) {
|
||||||
|
iris_init_batch(ice, (enum iris_batch_name) i, priority);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
find_exec_index(struct iris_batch *batch, struct iris_bo *bo)
|
find_exec_index(struct iris_batch *batch, struct iris_bo *bo)
|
||||||
{
|
{
|
||||||
|
@@ -176,9 +176,7 @@ struct iris_batch {
|
|||||||
struct iris_measure_batch *measure;
|
struct iris_measure_batch *measure;
|
||||||
};
|
};
|
||||||
|
|
||||||
void iris_init_batch(struct iris_context *ice,
|
void iris_init_batches(struct iris_context *ice, int priority);
|
||||||
enum iris_batch_name name,
|
|
||||||
int priority);
|
|
||||||
void iris_chain_to_new_batch(struct iris_batch *batch);
|
void iris_chain_to_new_batch(struct iris_batch *batch);
|
||||||
void iris_batch_free(struct iris_batch *batch);
|
void iris_batch_free(struct iris_batch *batch);
|
||||||
void iris_batch_maybe_flush(struct iris_batch *batch, unsigned estimate);
|
void iris_batch_maybe_flush(struct iris_batch *batch, unsigned estimate);
|
||||||
|
@@ -362,9 +362,7 @@ iris_create_context(struct pipe_screen *pscreen, void *priv, unsigned flags)
|
|||||||
if (INTEL_DEBUG(DEBUG_BATCH))
|
if (INTEL_DEBUG(DEBUG_BATCH))
|
||||||
ice->state.sizes = _mesa_hash_table_u64_create(ice);
|
ice->state.sizes = _mesa_hash_table_u64_create(ice);
|
||||||
|
|
||||||
for (int i = 0; i < IRIS_BATCH_COUNT; i++) {
|
iris_init_batches(ice, priority);
|
||||||
iris_init_batch(ice, (enum iris_batch_name) i, priority);
|
|
||||||
}
|
|
||||||
|
|
||||||
screen->vtbl.init_render_context(&ice->batches[IRIS_BATCH_RENDER]);
|
screen->vtbl.init_render_context(&ice->batches[IRIS_BATCH_RENDER]);
|
||||||
screen->vtbl.init_compute_context(&ice->batches[IRIS_BATCH_COMPUTE]);
|
screen->vtbl.init_compute_context(&ice->batches[IRIS_BATCH_COMPUTE]);
|
||||||
|
Reference in New Issue
Block a user