diff options
author | Francisco Jerez <[email protected]> | 2020-05-29 16:38:43 -0700 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-06-03 23:12:22 +0000 |
commit | eb5d1c27227302167d299bcaa2dabe623a242eb3 (patch) | |
tree | 2413ed0b52f78c17d6b518068865adce19922b1c /src/gallium/drivers/iris/iris_query.c | |
parent | e81c07de41c7f6f585a2c6aa0c67b1082b609b8f (diff) |
iris: Annotate all BO uses with domain and sequence number information.
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.
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_query.c')
-rw-r--r-- | src/gallium/drivers/iris/iris_query.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gallium/drivers/iris/iris_query.c b/src/gallium/drivers/iris/iris_query.c index aaed40e5e08..7f93d0f7ec7 100644 --- a/src/gallium/drivers/iris/iris_query.c +++ b/src/gallium/drivers/iris/iris_query.c @@ -101,7 +101,8 @@ query_mem64(struct iris_query *q, uint32_t offset) struct iris_address addr = { .bo = iris_resource_bo(q->query_state_ref.res), .offset = q->query_state_ref.offset + offset, - .write = true + .write = true, + .access = IRIS_DOMAIN_OTHER_WRITE }; return gen_mi_mem64(addr); } @@ -715,8 +716,9 @@ iris_get_query_result_resource(struct pipe_context *ctx, struct gen_mi_value result = calculate_result_on_gpu(devinfo, &b, q); struct gen_mi_value dst = - result_type <= PIPE_QUERY_TYPE_U32 ? gen_mi_mem32(rw_bo(dst_bo, offset)) - : gen_mi_mem64(rw_bo(dst_bo, offset)); + result_type <= PIPE_QUERY_TYPE_U32 ? + gen_mi_mem32(rw_bo(dst_bo, offset, IRIS_DOMAIN_OTHER_WRITE)) : + gen_mi_mem64(rw_bo(dst_bo, offset, IRIS_DOMAIN_OTHER_WRITE)); if (predicated) { gen_mi_store(&b, gen_mi_reg32(MI_PREDICATE_RESULT), |