iris: SBA once at context creation, not per batch
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 7 Apr 2018 08:01:24 +0000 (01:01 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 21 Feb 2019 18:26:05 +0000 (10:26 -0800)
hooray!

src/gallium/drivers/iris/iris_batch.c
src/gallium/drivers/iris/iris_batch.h
src/gallium/drivers/iris/iris_state.c

index d7c9dec7a83a85ca19ec41c05137e46be4de6f1e..c54f23f662ee43e63bd3e32545b3b40b1fa723b1 100644 (file)
@@ -218,9 +218,6 @@ iris_batch_reset(struct iris_batch *batch)
 
    if (batch->state_sizes)
       _mesa_hash_table_clear(batch->state_sizes, NULL);
-
-   if (batch->ring == I915_EXEC_RENDER)
-      batch->emit_state_base_address(batch);
 }
 
 static void
index 8161b2d8b0566dd84fe41db9e28608b3f54eb1ba..9d8f8c574679d27b03b90617f15f75550ecad2bc 100644 (file)
@@ -78,8 +78,6 @@ struct iris_batch {
    struct hash_table *state_sizes;
    struct gen_batch_decode_ctx decoder;
 #endif
-
-   void (*emit_state_base_address)(struct iris_batch *batch);
 };
 
 void iris_init_batch(struct iris_batch *batch,
index 12eb57a821b2f638257e37be5660fed116051ec4..4b400eee01f2951a18571c30852d26ab7f5fdfc4 100644 (file)
@@ -344,8 +344,12 @@ emit_state(struct iris_batch *batch,
 }
 
 static void
-iris_emit_state_base_address(struct iris_batch *batch)
+iris_init_render_context(struct iris_screen *screen,
+                         struct iris_batch *batch,
+                         struct pipe_debug_callback *dbg)
 {
+   iris_init_batch(batch, screen, dbg, I915_EXEC_RENDER);
+
    /* XXX: PIPE_CONTROLs */
 
    iris_emit_cmd(batch, GENX(STATE_BASE_ADDRESS), sba) {
@@ -379,15 +383,6 @@ iris_emit_state_base_address(struct iris_batch *batch)
       sba.InstructionBufferSize    = 0xfffff;
       sba.DynamicStateBufferSize   = 0xfffff;
    }
-}
-
-static void
-iris_init_render_context(struct iris_screen *screen,
-                         struct iris_batch *batch,
-                         struct pipe_debug_callback *dbg)
-{
-   batch->emit_state_base_address = iris_emit_state_base_address;
-   iris_init_batch(batch, screen, dbg, I915_EXEC_RENDER);
 
    iris_emit_cmd(batch, GENX(3DSTATE_DRAWING_RECTANGLE), rect) {
       rect.ClippedDrawingRectangleXMax = UINT16_MAX;