diff options
author | Kenneth Graunke <[email protected]> | 2019-10-02 10:25:17 -0400 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2019-10-07 13:15:56 -0700 |
commit | 90a35752b48626d9f8c7abcb34e87ac779dbdff0 (patch) | |
tree | 60a9c7897e60e8aeecb774d4331b7ef55e020403 /src/gallium/drivers | |
parent | 2d78e55a8c5481ad312014edff65f5c5fad013cb (diff) |
iris: Drop bonus parameters from iris_init_*_context()
Nothing uses vtbl or dbg, and screen is available from the batch.
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/iris/iris_context.c | 13 | ||||
-rw-r--r-- | src/gallium/drivers/iris/iris_context.h | 10 | ||||
-rw-r--r-- | src/gallium/drivers/iris/iris_state.c | 14 |
3 files changed, 10 insertions, 27 deletions
diff --git a/src/gallium/drivers/iris/iris_context.c b/src/gallium/drivers/iris/iris_context.c index 11762cbebd2..28f6be70df1 100644 --- a/src/gallium/drivers/iris/iris_context.c +++ b/src/gallium/drivers/iris/iris_context.c @@ -79,20 +79,17 @@ iris_lost_context_state(struct iris_batch *batch) * batch is one of our context's, so hackily claw our way back. */ struct iris_context *ice = NULL; - struct iris_screen *screen; if (batch->name == IRIS_BATCH_RENDER) { ice = container_of(batch, ice, batches[IRIS_BATCH_RENDER]); assert(&ice->batches[IRIS_BATCH_RENDER] == batch); - screen = (void *) ice->ctx.screen; - ice->vtbl.init_render_context(screen, batch, &ice->vtbl, &ice->dbg); + ice->vtbl.init_render_context(batch); } else if (batch->name == IRIS_BATCH_COMPUTE) { ice = container_of(batch, ice, batches[IRIS_BATCH_COMPUTE]); assert(&ice->batches[IRIS_BATCH_COMPUTE] == batch); - screen = (void *) ice->ctx.screen; - ice->vtbl.init_compute_context(screen, batch, &ice->vtbl, &ice->dbg); + ice->vtbl.init_compute_context(batch); } else { unreachable("unhandled batch reset"); } @@ -312,10 +309,8 @@ iris_create_context(struct pipe_screen *pscreen, void *priv, unsigned flags) I915_EXEC_RENDER, priority); } - ice->vtbl.init_render_context(screen, &ice->batches[IRIS_BATCH_RENDER], - &ice->vtbl, &ice->dbg); - ice->vtbl.init_compute_context(screen, &ice->batches[IRIS_BATCH_COMPUTE], - &ice->vtbl, &ice->dbg); + ice->vtbl.init_render_context(&ice->batches[IRIS_BATCH_RENDER]); + ice->vtbl.init_compute_context(&ice->batches[IRIS_BATCH_COMPUTE]); return ctx; } diff --git a/src/gallium/drivers/iris/iris_context.h b/src/gallium/drivers/iris/iris_context.h index 970c5688e95..85ffd1fece4 100644 --- a/src/gallium/drivers/iris/iris_context.h +++ b/src/gallium/drivers/iris/iris_context.h @@ -414,14 +414,8 @@ struct iris_stream_output_target { */ struct iris_vtable { void (*destroy_state)(struct iris_context *ice); - void (*init_render_context)(struct iris_screen *screen, - struct iris_batch *batch, - struct iris_vtable *vtbl, - struct pipe_debug_callback *dbg); - void (*init_compute_context)(struct iris_screen *screen, - struct iris_batch *batch, - struct iris_vtable *vtbl, - struct pipe_debug_callback *dbg); + void (*init_render_context)(struct iris_batch *batch); + void (*init_compute_context)(struct iris_batch *batch); void (*upload_render_state)(struct iris_context *ice, struct iris_batch *batch, const struct pipe_draw_info *draw); diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index b66eee791d1..8d193eb4ec3 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -776,12 +776,9 @@ iris_alloc_push_constants(struct iris_batch *batch) * way, but we never actually change. */ static void -iris_init_render_context(struct iris_screen *screen, - struct iris_batch *batch, - struct iris_vtable *vtbl, - struct pipe_debug_callback *dbg) +iris_init_render_context(struct iris_batch *batch) { - UNUSED const struct gen_device_info *devinfo = &screen->devinfo; + UNUSED const struct gen_device_info *devinfo = &batch->screen->devinfo; uint32_t reg_val; emit_pipeline_select(batch, _3D); @@ -888,12 +885,9 @@ iris_init_render_context(struct iris_screen *screen, } static void -iris_init_compute_context(struct iris_screen *screen, - struct iris_batch *batch, - struct iris_vtable *vtbl, - struct pipe_debug_callback *dbg) +iris_init_compute_context(struct iris_batch *batch) { - UNUSED const struct gen_device_info *devinfo = &screen->devinfo; + UNUSED const struct gen_device_info *devinfo = &batch->screen->devinfo; emit_pipeline_select(batch, GPGPU); |