From: Rob Clark Date: Sat, 23 May 2020 17:56:56 +0000 (-0700) Subject: freedreno: handle PIPE_TRANSFER_MAP_DIRECTLY X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3024d009006449df1e69cce4c90a7d1c7f01e5ca;p=mesa.git 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: --- 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;