Mesa (master): iris: Don't check VF address high bits when there is no buffer.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jun 20 18:32:52 UTC 2019


Module: Mesa
Branch: master
Commit: db8f57a5cb4ab8e1ad789793678797c04e95de21
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=db8f57a5cb4ab8e1ad789793678797c04e95de21

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Thu Jun 20 00:47:33 2019 -0500

iris: Don't check VF address high bits when there is no buffer.

If there is no buffer, then it doesn't matter.  Leave the old stale
high bits in place (for next time) and don't bother invalidating.

Cuts 5.6% of the flushes in the Civilization VI demo on Kabylake GT2.

---

 src/gallium/drivers/iris/iris_blorp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/iris/iris_blorp.c b/src/gallium/drivers/iris/iris_blorp.c
index 209940e9bc7..ede679e731a 100644
--- a/src/gallium/drivers/iris/iris_blorp.c
+++ b/src/gallium/drivers/iris/iris_blorp.c
@@ -212,7 +212,7 @@ blorp_vf_invalidate_for_vb_48b_transitions(struct blorp_batch *blorp_batch,
       struct iris_bo *bo = addrs[i].buffer;
       uint16_t high_bits = bo ? bo->gtt_offset >> 32u : 0;
 
-      if (high_bits != ice->state.last_vbo_high_bits[i]) {
+      if (bo && high_bits != ice->state.last_vbo_high_bits[i]) {
          need_invalidate = true;
          ice->state.last_vbo_high_bits[i] = high_bits;
       }




More information about the mesa-commit mailing list