Mesa (master): freedreno: handle PIPE_TRANSFER_MAP_DIRECTLY

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue May 26 19:28:41 UTC 2020


Module: Mesa
Branch: master
Commit: 3024d009006449df1e69cce4c90a7d1c7f01e5ca
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=3024d009006449df1e69cce4c90a7d1c7f01e5ca

Author: Rob Clark <robdclark at chromium.org>
Date:   Sat May 23 10:56:56 2020 -0700

freedreno: handle PIPE_TRANSFER_MAP_DIRECTLY

Just something I noticed in the process of debugging the issue fixed in
the previous commit.

Signed-off-by: Rob Clark <robdclark at chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5188>

---

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

diff --git a/src/gallium/drivers/freedreno/freedreno_resource.c b/src/gallium/drivers/freedreno/freedreno_resource.c
index 93738e20f74..f7111a499e7 100644
--- a/src/gallium/drivers/freedreno/freedreno_resource.c
+++ b/src/gallium/drivers/freedreno/freedreno_resource.c
@@ -569,6 +569,11 @@ fd_resource_transfer_map(struct pipe_context *pctx,
 	DBG("prsc=%p, level=%u, usage=%x, box=%dx%d+%d,%d", prsc, level, usage,
 		box->width, box->height, box->x, box->y);
 
+	if ((usage & PIPE_TRANSFER_MAP_DIRECTLY) && rsc->layout.tile_mode) {
+		DBG("CANNOT MAP DIRECTLY!\n");
+		return NULL;
+	}
+
 	ptrans = slab_alloc(&ctx->transfer_pool);
 	if (!ptrans)
 		return NULL;



More information about the mesa-commit mailing list