etnaviv: add helper to transfer resource level age to another
Add a small helper to transfer the age (seqno) from one resource level to another. 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/19964>
This commit is contained in:
@@ -245,7 +245,7 @@ etna_copy_resource(struct pipe_context *pctx, struct pipe_resource *dst,
|
||||
if (src == dst)
|
||||
etna_resource_level_mark_flushed(&dst_priv->levels[level]);
|
||||
else
|
||||
dst_priv->levels[level].seqno = src_priv->levels[level].seqno;
|
||||
etna_resource_level_copy_seqno(&dst_priv->levels[level], &src_priv->levels[level]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -282,7 +282,7 @@ etna_copy_resource_box(struct pipe_context *pctx, struct pipe_resource *dst,
|
||||
if (src == dst)
|
||||
etna_resource_level_mark_flushed(&dst_priv->levels[level]);
|
||||
else
|
||||
dst_priv->levels[level].seqno = src_priv->levels[level].seqno;
|
||||
etna_resource_level_copy_seqno(&dst_priv->levels[level], &src_priv->levels[level]);
|
||||
}
|
||||
|
||||
void
|
||||
|
@@ -113,6 +113,13 @@ etna_resource_level_mark_changed(struct etna_resource_level *lvl)
|
||||
lvl->seqno++;
|
||||
}
|
||||
|
||||
static inline void
|
||||
etna_resource_level_copy_seqno(struct etna_resource_level *dst,
|
||||
struct etna_resource_level *src)
|
||||
{
|
||||
dst->seqno = src->seqno;
|
||||
}
|
||||
|
||||
/* status of queued up but not flushed reads and write operations.
|
||||
* In _transfer_map() we need to know if queued up rendering needs
|
||||
* to be flushed to preserve the order of cpu and gpu access. */
|
||||
|
Reference in New Issue
Block a user