panfrost: Allocate extra data for depth buffer

It's not clear why the hardware "spills" a little bit, but if we don't
do this, we get MMU faults with linear depth buffers.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
This commit is contained in:
Alyssa Rosenzweig
2019-03-13 00:53:34 +00:00
parent 79e474fa46
commit 54e45d1d73

View File

@@ -197,6 +197,11 @@ panfrost_create_bo(struct panfrost_screen *screen, const struct pipe_resource *t
if (template->height0) sz *= template->height0;
if (template->depth0) sz *= template->depth0;
/* Depth buffers require extra space for unknown reasons */
if (template->bind & PIPE_BIND_DEPTH_STENCIL)
sz = sz + sz/256;
/* Based on the usage, figure out what storing will be used. There are
* various tradeoffs:
*