[Mesa-dev] [PATCH 43/51] i965: Unconditionally reset the HW binding table offsets after a batch
Chris Wilson
chris at chris-wilson.co.uk
Tue Jan 10 21:24:06 UTC 2017
Rather than spend an instruction deciding whether we need to, just zero
out the single integer to reset the HW binding tables.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
src/mesa/drivers/dri/i965/brw_binding_tables.c | 6 ------
src/mesa/drivers/dri/i965/brw_context.c | 3 +--
src/mesa/drivers/dri/i965/brw_state.h | 5 ++++-
3 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_binding_tables.c b/src/mesa/drivers/dri/i965/brw_binding_tables.c
index 1a0c0b128e..5a21b695c2 100644
--- a/src/mesa/drivers/dri/i965/brw_binding_tables.c
+++ b/src/mesa/drivers/dri/i965/brw_binding_tables.c
@@ -420,12 +420,6 @@ gen7_enable_hw_binding_tables(struct brw_context *brw)
ADVANCE_BATCH();
}
-void
-gen7_reset_hw_bt_pool_offsets(struct brw_context *brw)
-{
- brw->hw_bt_pool.next_offset = 0;
-}
-
const struct brw_tracked_state gen7_hw_binding_tables = {
.dirty = {
.mesa = 0,
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index 99190f06cd..ba4e18443b 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -1832,8 +1832,7 @@ void brw_batch_finish_hook(brw_batch *batch)
brw->ib.type = -1;
- if (brw->use_resource_streamer)
- gen7_reset_hw_bt_pool_offsets(brw);
+ gen7_reset_hw_bt_pool_offsets(brw);
}
void brw_batch_report_flush_hook(struct brw_batch *batch,
diff --git a/src/mesa/drivers/dri/i965/brw_state.h b/src/mesa/drivers/dri/i965/brw_state.h
index 0feeeb08dc..32946ecca7 100644
--- a/src/mesa/drivers/dri/i965/brw_state.h
+++ b/src/mesa/drivers/dri/i965/brw_state.h
@@ -383,7 +383,10 @@ void gen7_update_binding_table_from_array(struct brw_context *brw,
int num_surfaces);
void gen7_enable_hw_binding_tables(struct brw_context *brw);
void gen7_disable_hw_binding_tables(struct brw_context *brw);
-void gen7_reset_hw_bt_pool_offsets(struct brw_context *brw);
+static inline void gen7_reset_hw_bt_pool_offsets(struct brw_context *brw)
+{
+ brw->hw_bt_pool.next_offset = 0;
+}
/* brw_clip.c */
void brw_upload_clip_prog(struct brw_context *brw);
--
2.11.0
More information about the mesa-dev
mailing list