From: Rob Clark Date: Thu, 19 Sep 2013 14:08:38 +0000 (-0400) Subject: freedreno: fix glReadPixels X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=575a6e7ec57dc70f96e2618748ed07c7882cf8c1;p=mesa.git freedreno: fix glReadPixels duh, we still need to flush if there are pending draws and it isn't an unsynchronized case. Signed-off-by: Rob Clark --- diff --git a/src/gallium/drivers/freedreno/freedreno_resource.c b/src/gallium/drivers/freedreno/freedreno_resource.c index fd975cb388d..bae1874ed3d 100644 --- a/src/gallium/drivers/freedreno/freedreno_resource.c +++ b/src/gallium/drivers/freedreno/freedreno_resource.c @@ -123,8 +123,8 @@ fd_resource_transfer_map(struct pipe_context *pctx, op |= DRM_FREEDRENO_PREP_NOSYNC; /* some state trackers (at least XA) don't do this.. */ -// if (!(usage & PIPE_TRANSFER_FLUSH_EXPLICIT)) -// fd_resource_transfer_flush_region(pctx, ptrans, box); + if (!(usage & (PIPE_TRANSFER_FLUSH_EXPLICIT | PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE))) + fd_resource_transfer_flush_region(pctx, ptrans, box); if (!(usage & PIPE_TRANSFER_UNSYNCHRONIZED)) { ret = fd_bo_cpu_prep(rsc->bo, ctx->screen->pipe, op);