mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-10 12:30:11 +01:00
etnaviv: keep blit destination tile status valid if possible
If the blit was just a resource flush on a uncompressed buffer we can keep the tile status as valid, as in that case only clear tiles are filled in the target buffer, but it doesn't hurt to look at the TS buffer when fetching from this resource as the tile status matches the content of the buffer. For compressed formats we can't do the same, as the compressed tiles are uncompressed when flushing the resource, so the compression tags don't match the buffer content anymore. 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:
parent
dce4aa83e4
commit
61e27debf5
2 changed files with 17 additions and 2 deletions
|
|
@ -579,7 +579,14 @@ etna_try_blt_blit(struct pipe_context *pctx,
|
|||
resource_written(ctx, &dst->base);
|
||||
|
||||
etna_resource_level_mark_changed(dst_lev);
|
||||
etna_resource_level_ts_mark_invalid(dst_lev);
|
||||
|
||||
/* We don't need to mark the TS as invalid if this was just a flush without
|
||||
* compression, as in that case only clear tiles are filled and the tile
|
||||
* status still matches the blit target buffer. For compressed formats the
|
||||
* tiles are decompressed, so tile status doesn't match anymore.
|
||||
*/
|
||||
if (src != dst || src_lev->ts_compress_fmt >= 0)
|
||||
etna_resource_level_ts_mark_invalid(dst_lev);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -807,7 +807,15 @@ etna_try_rs_blit(struct pipe_context *pctx,
|
|||
resource_read(ctx, &src->base);
|
||||
resource_written(ctx, &dst->base);
|
||||
etna_resource_level_mark_changed(dst_lev);
|
||||
etna_resource_level_ts_mark_invalid(dst_lev);
|
||||
|
||||
/* We don't need to mark the TS as invalid if this was just a flush without
|
||||
* compression, as in that case only clear tiles are filled and the tile
|
||||
* status still matches the blit target buffer. For compressed formats the
|
||||
* tiles are decompressed, so tile status doesn't match anymore.
|
||||
*/
|
||||
if (src != dst || src_lev->ts_compress_fmt >= 0)
|
||||
etna_resource_level_ts_mark_invalid(dst_lev);
|
||||
|
||||
ctx->dirty |= ETNA_DIRTY_DERIVE_TS;
|
||||
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue