mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
etnaviv: track resource sharing
Track if resources are shared outside of the screen, which means changes to the resource must be visible to the external observers after a flush and the resource might be manipulated by other agents than the contexts from the screen. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25756>
This commit is contained in:
parent
22c4a5e127
commit
9ab9df3941
2 changed files with 4 additions and 0 deletions
|
|
@ -678,6 +678,7 @@ etna_resource_from_handle(struct pipe_screen *pscreen,
|
|||
rsc->layout = modifier_to_layout(modifier);
|
||||
rsc->modifier = modifier;
|
||||
|
||||
rsc->shared = true;
|
||||
if (usage & PIPE_HANDLE_USAGE_EXPLICIT_FLUSH)
|
||||
rsc->explicit_flush = true;
|
||||
|
||||
|
|
@ -780,6 +781,7 @@ etna_resource_get_handle(struct pipe_screen *pscreen,
|
|||
}
|
||||
handle->modifier = etna_resource_modifier(rsc);
|
||||
|
||||
rsc->shared = true;
|
||||
if (!(usage & PIPE_HANDLE_USAGE_EXPLICIT_FLUSH))
|
||||
rsc->explicit_flush = false;
|
||||
|
||||
|
|
|
|||
|
|
@ -209,6 +209,8 @@ struct etna_resource {
|
|||
struct pipe_resource *render;
|
||||
/* frontend flushes resource via an explicit call to flush_resource */
|
||||
bool explicit_flush;
|
||||
/* resource is shared outside of the screen */
|
||||
bool shared;
|
||||
};
|
||||
|
||||
/* returns TRUE if a is newer than b */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue