Mesa (main): freedreno: swap ->valid when shadowing resources.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jun 30 21:57:29 UTC 2021


Module: Mesa
Branch: main
Commit: f413b30ad486ac9ca19db5309d54b26907f0c6ee
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f413b30ad486ac9ca19db5309d54b26907f0c6ee

Author: Emma Anholt <emma at anholt.net>
Date:   Tue Jun 22 14:55:37 2021 -0700

freedreno: swap ->valid when shadowing resources.

The valid flag indicates whether the bo has had any data written to it.
Failure to swap it meant that if for some reason we fell back to SW
mappings during the blit from shadow, the PIPE_MAP_READ staging blit would
get dropped.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11544>

---

 src/gallium/drivers/freedreno/freedreno_resource.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/gallium/drivers/freedreno/freedreno_resource.c b/src/gallium/drivers/freedreno/freedreno_resource.c
index 56df34f769e..95c51956254 100644
--- a/src/gallium/drivers/freedreno/freedreno_resource.c
+++ b/src/gallium/drivers/freedreno/freedreno_resource.c
@@ -442,6 +442,7 @@ fd_try_shadow_resource(struct fd_context *ctx, struct fd_resource *rsc,
        rsc->track, shadow, shadow->b.b.reference.count, shadow->track);
 
    swap(rsc->bo, shadow->bo);
+   swap(rsc->valid, shadow->valid);
    swap(rsc->layout, shadow->layout);
    rsc->seqno = p_atomic_inc_return(&ctx->screen->rsc_seqno);
 



More information about the mesa-commit mailing list