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 <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3875>
This commit is contained in:
committed by
Marge Bot
parent
e81c07de41
commit
eb5d1c2722
@@ -216,7 +216,7 @@ iris_blorp_lookup_shader(struct blorp_batch *blorp_batch,
|
||||
iris_bo_offset_from_base_address(bo) + shader->assembly.offset;
|
||||
*((void **) prog_data_out) = shader->prog_data;
|
||||
|
||||
iris_use_pinned_bo(batch, bo, false);
|
||||
iris_use_pinned_bo(batch, bo, false, IRIS_DOMAIN_NONE);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -248,7 +248,7 @@ iris_blorp_upload_shader(struct blorp_batch *blorp_batch, uint32_t stage,
|
||||
iris_bo_offset_from_base_address(bo) + shader->assembly.offset;
|
||||
*((void **) prog_data_out) = shader->prog_data;
|
||||
|
||||
iris_use_pinned_bo(batch, bo, false);
|
||||
iris_use_pinned_bo(batch, bo, false, IRIS_DOMAIN_NONE);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user