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@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5188>
This commit is contained in:
Rob Clark 2020-05-23 10:56:56 -07:00 committed by Marge Bot
parent 8728c42031
commit 3024d00900

View file

@ -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;