diff options
author | Ilia Mirkin <[email protected]> | 2015-04-03 02:25:58 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2015-04-05 16:36:34 -0400 |
commit | 1fee3061d531a9f4068952209926ad518aab07ee (patch) | |
tree | 06f2281edcc4efd29df1de8b253e768dcdcb99cb /src/gallium/drivers/freedreno/freedreno_resource.c | |
parent | ea0952a9db1b5887f915d8f750f5fa9c45719976 (diff) |
freedreno: add a reading flag to indicate gpu is reading rsc
Signed-off-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/freedreno_resource.c')
-rw-r--r-- | src/gallium/drivers/freedreno/freedreno_resource.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_resource.c b/src/gallium/drivers/freedreno/freedreno_resource.c index 407a3528aaa..6e7958d42dd 100644 --- a/src/gallium/drivers/freedreno/freedreno_resource.c +++ b/src/gallium/drivers/freedreno/freedreno_resource.c @@ -123,7 +123,8 @@ fd_resource_transfer_map(struct pipe_context *pctx, /* If the GPU is writing to the resource, or if it is reading from the * resource and we're trying to write to it, flush the renders. */ - if (rsc->dirty) + if (rsc->dirty || + ((ptrans->usage & PIPE_TRANSFER_WRITE) && rsc->reading)) fd_context_render(pctx); /* The GPU keeps track of how the various bo's are being used, and |