summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/freedreno_batch.c
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2017-12-04 11:01:52 -0500
committerRob Clark <[email protected]>2017-12-04 11:50:45 -0500
commit1ec1ae47f73cc948e05c1a49d55b90887d1fe15b (patch)
treebefaddbfe0130e897e7e2dd8cecb73be08c9d048 /src/gallium/drivers/freedreno/freedreno_batch.c
parente90f1a26c34b7c047a80dd6e6894a266fbb47e7f (diff)
freedreno: mark stencil buffer valid too in case of z32x24s8
The separate stencil buffer was not also getting marked as valid if written by a draw/clear, resulting in gmem2mem getting skipped. Move this into fd_batch_resource_used() which also handles the separate stencil case. Also fix restore_buffers typo. Fixes: 4ab6ab80365 freedreno: avoid mem2gmem for invalidated buffers Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/freedreno_batch.c')
-rw-r--r--src/gallium/drivers/freedreno/freedreno_batch.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_batch.c b/src/gallium/drivers/freedreno/freedreno_batch.c
index 9c66dc98bc7..6e208d350ea 100644
--- a/src/gallium/drivers/freedreno/freedreno_batch.c
+++ b/src/gallium/drivers/freedreno/freedreno_batch.c
@@ -382,6 +382,9 @@ fd_batch_resource_used(struct fd_batch *batch, struct fd_resource *rsc, bool wri
DBG("%p: %s %p", batch, write ? "write" : "read", rsc);
+ if (write)
+ rsc->valid = true;
+
/* note, invalidate write batch, to avoid further writes to rsc
* resulting in a write-after-read hazard.
*/