Nothing uses vtbl or dbg, and screen is available from the 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");
}
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;
}
*/
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);
* 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);
}
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);