From bae5414594ddd181e6ab58ac87e2627562f86113 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Tue, 23 Jan 2018 00:44:44 -0800 Subject: iris: initial gpu state --- src/gallium/drivers/iris/iris_context.c | 1 + src/gallium/drivers/iris/iris_context.h | 1 + src/gallium/drivers/iris/iris_state.c | 5 ++--- 3 files changed, 4 insertions(+), 3 deletions(-) (limited to 'src/gallium/drivers') diff --git a/src/gallium/drivers/iris/iris_context.c b/src/gallium/drivers/iris/iris_context.c index 42d7efd8ed4..9842ab559e2 100644 --- a/src/gallium/drivers/iris/iris_context.c +++ b/src/gallium/drivers/iris/iris_context.c @@ -117,6 +117,7 @@ iris_create_context(struct pipe_screen *pscreen, void *priv, unsigned flags) iris_init_program_cache(ice); iris_init_batch(&ice->render_batch, screen, &ice->dbg, I915_EXEC_RENDER); + iris_upload_initial_gpu_state(&ice->render_batch); return ctx; } diff --git a/src/gallium/drivers/iris/iris_context.h b/src/gallium/drivers/iris/iris_context.h index d57898695f1..aab8bd0891a 100644 --- a/src/gallium/drivers/iris/iris_context.h +++ b/src/gallium/drivers/iris/iris_context.h @@ -155,6 +155,7 @@ void iris_init_query_functions(struct pipe_context *ctx); void iris_setup_state_base_address(struct iris_context *ice, struct iris_batch *batch, struct iris_bo *instruction_bo); +void iris_upload_initial_gpu_state(struct iris_batch *batch); void iris_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 23888c4a7b2..42a2d6ff60b 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -282,9 +282,8 @@ ro_bo(struct iris_bo *bo, uint32_t offset) return (struct iris_address) { .bo = bo, .offset = offset }; } -static void -iris_upload_initial_gpu_state(struct iris_context *ice, - struct iris_batch *batch) +void +iris_upload_initial_gpu_state(struct iris_batch *batch) { iris_emit_cmd(batch, GENX(3DSTATE_DRAWING_RECTANGLE), rect) { rect.ClippedDrawingRectangleXMax = UINT16_MAX; -- cgit v1.2.3