summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2018-04-07 01:01:24 -0700
committerKenneth Graunke <[email protected]>2019-02-21 10:26:05 -0800
commitd890aee15d7e466f81306a3cf917fedb76e66152 (patch)
tree4149177756dca80888a73e1a94181370e90fb252 /src/gallium/drivers
parente0eac28bd4287f4ed56b57ca9acb4bc07961a465 (diff)
iris: SBA once at context creation, not per batch
hooray!
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/iris/iris_batch.c3
-rw-r--r--src/gallium/drivers/iris/iris_batch.h2
-rw-r--r--src/gallium/drivers/iris/iris_state.c15
3 files changed, 5 insertions, 15 deletions
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;