summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2018-01-23 00:44:44 -0800
committerKenneth Graunke <[email protected]>2019-02-21 10:26:05 -0800
commitbae5414594ddd181e6ab58ac87e2627562f86113 (patch)
treee4d4c8ddf9cd59ae372050dcd323b0bef185f6ff /src/gallium/drivers
parent0477591355d6edd3f1ad02aed907f409403bd041 (diff)
iris: initial gpu state
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/iris/iris_context.c1
-rw-r--r--src/gallium/drivers/iris/iris_context.h1
-rw-r--r--src/gallium/drivers/iris/iris_state.c5
3 files changed, 4 insertions, 3 deletions
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;