From: Kenneth Graunke Date: Sat, 7 Apr 2018 08:01:24 +0000 (-0700) Subject: iris: SBA once at context creation, not per batch X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d890aee15d7e466f81306a3cf917fedb76e66152;p=mesa.git iris: SBA once at context creation, not per batch hooray! --- diff --git a/src/gallium/drivers/iris/iris_batch.c b/src/gallium/drivers/iris/iris_batch.c index d7c9dec7a83..c54f23f662e 100644 --- a/src/gallium/drivers/iris/iris_batch.c +++ b/src/gallium/drivers/iris/iris_batch.c @@ -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 diff --git a/src/gallium/drivers/iris/iris_batch.h b/src/gallium/drivers/iris/iris_batch.h index 8161b2d8b05..9d8f8c57467 100644 --- a/src/gallium/drivers/iris/iris_batch.h +++ b/src/gallium/drivers/iris/iris_batch.h @@ -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, diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index 12eb57a821b..4b400eee01f 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -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;