etnaviv: flush destination before executing blit
A blit into a render target may destroy valid TS information, as the destination TS isn't updated. Flush the blit destination when necessary to make sure that all pending TS is resolved into the destination before the blit is executed. 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:
@@ -475,6 +475,11 @@ etna_try_blt_blit(struct pipe_context *pctx,
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Flush destination, as the blit will invalidate any pending TS changes. */
|
||||
if (dst != src && etna_resource_level_needs_flush(dst_lev))
|
||||
etna_copy_resource(pctx, &dst->base, &dst->base,
|
||||
blit_info->dst.level, blit_info->dst.level);
|
||||
|
||||
/* Kick off BLT here */
|
||||
if (src == dst && src_lev->ts_compress_fmt < 0) {
|
||||
/* Resolve-in-place */
|
||||
|
@@ -720,6 +720,11 @@ etna_try_rs_blit(struct pipe_context *pctx,
|
||||
width & (w_align - 1) || height & (h_align - 1))
|
||||
goto manual;
|
||||
|
||||
/* Flush destination, as the blit will invalidate any pending TS changes. */
|
||||
if (dst != src && etna_resource_level_needs_flush(dst_lev))
|
||||
etna_copy_resource(pctx, &dst->base, &dst->base,
|
||||
blit_info->dst.level, blit_info->dst.level);
|
||||
|
||||
/* Always flush color and depth cache together before resolving. This makes
|
||||
* sure that all previous cache content written by the PE is flushed out
|
||||
* before RS uses the pixel pipes, which invalidates those caches. */
|
||||
|
Reference in New Issue
Block a user