From 3024d009006449df1e69cce4c90a7d1c7f01e5ca Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Sat, 23 May 2020 10:56:56 -0700 Subject: [PATCH] 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 Part-of: --- 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; -- 2.30.2