From: Alyssa Rosenzweig Date: Tue, 26 May 2020 22:19:19 +0000 (-0400) Subject: panfrost: Tweak zsbuf magic numbers for Bifrost X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=76e871d3ffc8fac11881fc3f78f86ebfec3955af;p=mesa.git panfrost: Tweak zsbuf magic numbers for Bifrost Signed-off-by: Alyssa Rosenzweig Part-of: --- diff --git a/src/gallium/drivers/panfrost/pan_mfbd.c b/src/gallium/drivers/panfrost/pan_mfbd.c index db7205528a9..2212f6a301f 100644 --- a/src/gallium/drivers/panfrost/pan_mfbd.c +++ b/src/gallium/drivers/panfrost/pan_mfbd.c @@ -250,6 +250,8 @@ panfrost_mfbd_set_zsbuf( struct mali_framebuffer_extra *fbx, struct pipe_surface *surf) { + struct panfrost_device *dev = pan_device(surf->context->screen); + bool is_bifrost = dev->quirks & IS_BIFROST; struct panfrost_resource *rsrc = pan_resource(surf->texture); unsigned level = surf->u.tex.level; @@ -292,7 +294,14 @@ panfrost_mfbd_set_zsbuf( fbx->zs_block = MALI_BLOCK_LINEAR; fbx->ds_linear.depth_stride = stride / 16; } else { - fbx->zs_block = MALI_BLOCK_TILED; + if (is_bifrost) { + fbx->zs_block = MALI_BLOCK_UNKNOWN; + fbx->flags_hi |= 0x4400; + fbx->flags_lo |= 0x1; + } else { + fbx->zs_block = MALI_BLOCK_TILED; + } + fbx->ds_linear.depth_stride = stride; }