aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/iris/iris_batch.h
diff options
context:
space:
mode:
authorFrancisco Jerez <[email protected]>2020-02-06 21:06:17 -0800
committerMarge Bot <[email protected]>2020-06-03 23:12:22 +0000
commit4b7fd91be656ecc7944b7523b28246366cf5a8b7 (patch)
treef26c622fe217dc87fa1dca6f8e507fa086ef59cb /src/gallium/drivers/iris/iris_batch.h
parentae88e79f6959df71953db6314c78f68bd2799f3c (diff)
iris: Report use of any in-flight buffers on first draw call after sync boundary.
This is the main performance trade-off of this cache tracking mechanism: In order for the seqno vector of buffer objects to be accurate, they need to be marked as used again every time the batch is split into a new synchronization section if they remain bound to the pipeline. This can be achieved easily by re-using iris_restore_render_saved_bos() and iris_restore_compute_saved_bos(), which currently serve a similar purpose across batch buffer boundaries. The impact on Piglit drawoverhead results seems to be within a standard deviation of the current results. XXX - It might be possible to completely remove the current iris_batch::contains_draw flag at a small additional performance cost. Reviewed-by: Kenneth Graunke <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3875>
Diffstat (limited to 'src/gallium/drivers/iris/iris_batch.h')
-rw-r--r--src/gallium/drivers/iris/iris_batch.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/iris/iris_batch.h b/src/gallium/drivers/iris/iris_batch.h
index bfea20d268c..00f62f2fb6f 100644
--- a/src/gallium/drivers/iris/iris_batch.h
+++ b/src/gallium/drivers/iris/iris_batch.h
@@ -153,6 +153,9 @@ struct iris_batch {
/** Have we emitted any draw calls to this batch? */
bool contains_draw;
+ /** Have we emitted any draw calls with next_seqno? */
+ bool contains_draw_with_next_seqno;
+
/**
* Number of times iris_batch_sync_region_start() has been called without a
* matching iris_batch_sync_region_end() on this batch.
@@ -304,6 +307,7 @@ static inline void
iris_batch_sync_boundary(struct iris_batch *batch)
{
if (!batch->sync_region_depth) {
+ batch->contains_draw_with_next_seqno = false;
batch->next_seqno = p_atomic_inc_return(&batch->screen->last_seqno);
assert(batch->next_seqno > 0);
}