From b6cf4001d3b113a2caa1860584c79794e0b00d46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Roberto=20de=20Souza?= Date: Tue, 11 Apr 2023 12:18:43 -0700 Subject: [PATCH] iris: Initialize batch screen in iris_init_batch() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The comment to initialize screen earlier not valid anymore so we can initialize it with the rest of batch fields. Signed-off-by: José Roberto de Souza Reviewed-by: Lionel Landwerlin Part-of: --- src/gallium/drivers/iris/iris_batch.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/gallium/drivers/iris/iris_batch.c b/src/gallium/drivers/iris/iris_batch.c index d85acb65e42..7f009f7c3cd 100644 --- a/src/gallium/drivers/iris/iris_batch.c +++ b/src/gallium/drivers/iris/iris_batch.c @@ -197,6 +197,7 @@ iris_init_batch(struct iris_context *ice, batch->state_sizes = ice->state.sizes; batch->name = name; batch->ice = ice; + batch->screen = screen; batch->contains_fence_signal = false; batch->fine_fences.uploader = @@ -255,10 +256,6 @@ iris_init_batch(struct iris_context *ice, void iris_init_batches(struct iris_context *ice) { - /* We have to do this early for iris_foreach_batch() to work */ - for (int i = 0; i < IRIS_BATCH_COUNT; i++) - ice->batches[i].screen = (void *) ice->ctx.screen; - iris_i915_init_batches(ice); iris_foreach_batch(ice, batch)