iris: Annotate all BO uses with domain and sequence number information

Graphics / Mesa 3D Graphics Library / Mesa - Francisco Jerez [riseup.net] - 3 June 2020 23:12 UTC

Probably the most annoying patch to review from the whole series --Mark every buffer object use as accessed through some caching domain with the sequence number of the current synchronization section of the batch. The additional argument of iris_use_pinned_bo() makes sure I'd have gotten a compile error if I had missed any buffer added to the batch validation list.

There are only a few exceptions where a buffer is left untracked while adding it to the validation list, justified below:

- Batch buffers: These are strictly read-only for the moment.

- BLORP buffer objects: Their seqnos are bumped manually at the end of iris_blorp_exec() instead, in order to avoid plumbing domain information through BLORP address combining.

- Scratch buffers: The contents of these are strictly thread-local.

- Shader images and SSBOs: Accesses of these buffers are explicitly synchronized at the API level.

v2: Opt out of tracking more aggressively (Ken): In addition to the above, surface states, binding tables, instructions and most dynamic states are now left untracked, which means a *lot* more BO uses marked IRIS_DOMAIN_NONE which need to be reviewed extremely carefully, since the cache tracker won't be able to provide any coherency guarantees for them.

eb5d1c27227 iris: Annotate all BO uses with domain and sequence number information.
src/gallium/drivers/iris/iris_batch.c | 11 +-
src/gallium/drivers/iris/iris_batch.h | 2 +-
src/gallium/drivers/iris/iris_blorp.c | 20 ++-
src/gallium/drivers/iris/iris_genx_macros.h | 10 +-
src/gallium/drivers/iris/iris_program_cache.c | 4 +-
src/gallium/drivers/iris/iris_query.c | 8 +-
src/gallium/drivers/iris/iris_screen.h | 1 +
src/gallium/drivers/iris/iris_state.c | 197 ++++++++++++++++----------
8 files changed, 161 insertions(+), 92 deletions(-)

Upstream: cgit.freedesktop.org


  • Share