iris: initial gpu state
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 23 Jan 2018 08:44:44 +0000 (00:44 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 21 Feb 2019 18:26:05 +0000 (10:26 -0800)
src/gallium/drivers/iris/iris_context.c
src/gallium/drivers/iris/iris_context.h
src/gallium/drivers/iris/iris_state.c

index 42d7efd8ed4bfb95d5a18e3271eec5e61d527c94..9842ab559e26f0a08c06a2b82d971a9462bcf123 100644 (file)
@@ -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;
 }
index d57898695f1cfab541f6c8a8f41b91060cf44dbf..aab8bd0891a67a42e9d74d85daa297314d8e19ae 100644 (file)
@@ -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);
index 23888c4a7b2b2d8a9a2ba28c1378fc4552a50f0f..42a2d6ff60b7b878dc0871d6a4c66636db63fc73 100644 (file)
@@ -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;