diff options
author | Alyssa Rosenzweig <[email protected]> | 2019-03-13 00:53:34 +0000 |
---|---|---|
committer | Alyssa Rosenzweig <[email protected]> | 2019-03-14 22:47:12 +0000 |
commit | 54e45d1d736954bd9f11d6825c7b242e16f8283b (patch) | |
tree | d9264bb849e4d82e59dddca046df9d5fcdae1b5b /src/gallium | |
parent | 79e474fa46d560e1f6bdab345f88f657513dc96f (diff) |
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 <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/panfrost/pan_resource.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/drivers/panfrost/pan_resource.c b/src/gallium/drivers/panfrost/pan_resource.c index 2fa468b177b..89be07871a5 100644 --- a/src/gallium/drivers/panfrost/pan_resource.c +++ b/src/gallium/drivers/panfrost/pan_resource.c @@ -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: * |