iris: Don't check VF address high bits when there is no buffer.
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 20 Jun 2019 05:47:33 +0000 (00:47 -0500)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 20 Jun 2019 18:32:16 +0000 (13:32 -0500)
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

index 209940e9bc788ff1aadc5eb061268b8440be444b..ede679e731af0002d05157def0640731a7e5b7ea 100644 (file)
@@ -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;
       }