From 575a6e7ec57dc70f96e2618748ed07c7882cf8c1 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Thu, 19 Sep 2013 10:08:38 -0400 Subject: [PATCH] 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 --- src/gallium/drivers/freedreno/freedreno_resource.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); -- 2.30.2