panfrost: fix untracked dependency when converting resource modifier
Signed-off-by: Italo Nicola <italonicola@collabora.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24942>
This commit is contained in:
@@ -1328,6 +1328,9 @@ pan_resource_modifier_convert(struct panfrost_context *ctx,
|
||||
.filter = PIPE_TEX_FILTER_NEAREST,
|
||||
};
|
||||
|
||||
/* data_valid is not valid until flushed */
|
||||
panfrost_flush_writer(ctx, rsrc, "AFBC decompressing blit");
|
||||
|
||||
for (int i = 0; i <= rsrc->base.last_level; i++) {
|
||||
if (BITSET_TEST(rsrc->valid.data, i)) {
|
||||
blit.dst.level = blit.src.level = i;
|
||||
@@ -1343,6 +1346,11 @@ pan_resource_modifier_convert(struct panfrost_context *ctx,
|
||||
}
|
||||
}
|
||||
|
||||
/* we lose track of tmp_rsrc after this point, and the BO migration
|
||||
* (from tmp_rsrc to rsrc) doesn't transfer the last_writer to rsrc
|
||||
*/
|
||||
panfrost_flush_writer(ctx, tmp_rsrc, "AFBC decompressing blit");
|
||||
|
||||
panfrost_bo_unreference(rsrc->image.data.bo);
|
||||
|
||||
rsrc->image.data.bo = tmp_rsrc->image.data.bo;
|
||||
|
Reference in New Issue
Block a user