blorp: Add a blorp_address::local_hint flag
This will be used as a performance hint for XY_BLOCK_COPY_BLT to indicate whether the source/destination surfaces are (likely) in device-local memory or system memory. We don't need to be precise here - it's okay to set the fields to LOCAL even if a buffer has been evicted out to system memory. We should set this from Vulkan too, but I haven't yet. There isn't a convenient anv_bo field like there is in iris... Reviewed-by: Caio Oliveira <caio.oliveira@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14687>
This commit is contained in:

committed by
Marge Bot

parent
5262475242
commit
abd71630fc
@@ -195,6 +195,7 @@ blorp_alloc_vertex_buffer(struct blorp_batch *blorp_batch,
|
||||
.offset = offset,
|
||||
.mocs = iris_mocs(bo, &batch->screen->isl_dev,
|
||||
ISL_SURF_USAGE_VERTEX_BUFFER_BIT),
|
||||
.local_hint = iris_bo_likely_local(bo),
|
||||
};
|
||||
|
||||
return map;
|
||||
@@ -242,6 +243,8 @@ blorp_get_workaround_address(struct blorp_batch *blorp_batch)
|
||||
return (struct blorp_address) {
|
||||
.buffer = batch->screen->workaround_address.bo,
|
||||
.offset = batch->screen->workaround_address.offset,
|
||||
.local_hint =
|
||||
iris_bo_likely_local(batch->screen->workaround_address.bo),
|
||||
};
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user