freedreno: mark stencil buffer valid too in case of z32x24s8
authorRob Clark <robdclark@gmail.com>
Mon, 4 Dec 2017 16:01:52 +0000 (11:01 -0500)
committerRob Clark <robdclark@gmail.com>
Mon, 4 Dec 2017 16:50:45 +0000 (11:50 -0500)
commit1ec1ae47f73cc948e05c1a49d55b90887d1fe15b
treebefaddbfe0130e897e7e2dd8cecb73be08c9d048
parente90f1a26c34b7c047a80dd6e6894a266fbb47e7f
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 <robdclark@gmail.com>
src/gallium/drivers/freedreno/freedreno_batch.c
src/gallium/drivers/freedreno/freedreno_draw.c