mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 02:28:10 +02:00
panfrost: Flag BO shareable when appropriate
Let the kmod backend know when we might end up exporting a BO. This doesn't change anything for the Panfrost kmod backend, but will be needed for Panthor. Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26357>
This commit is contained in:
parent
30d6dfb861
commit
0463a951ad
1 changed files with 7 additions and 2 deletions
|
|
@ -737,9 +737,14 @@ panfrost_resource_create_with_modifier(struct pipe_screen *screen,
|
|||
} else {
|
||||
/* We create a BO immediately but don't bother mapping, since we don't
|
||||
* care to map e.g. FBOs which the CPU probably won't touch */
|
||||
uint32_t flags = PAN_BO_DELAY_MMAP;
|
||||
|
||||
so->image.data.bo = panfrost_bo_create(dev, so->image.layout.data_size,
|
||||
PAN_BO_DELAY_MMAP, label);
|
||||
/* If the resource is never exported, we can make the BO private. */
|
||||
if (template->bind & PIPE_BIND_SHARED)
|
||||
flags |= PAN_BO_SHAREABLE;
|
||||
|
||||
so->image.data.bo =
|
||||
panfrost_bo_create(dev, so->image.layout.data_size, flags, label);
|
||||
|
||||
so->constant_stencil = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue