From: Eric Anholt Date: Thu, 12 Dec 2019 00:30:43 +0000 (-0800) Subject: freedreno/a6xx: Disable the core layer-size setup. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f9f5d3eb554e6096b762744125580a239d3809b0;p=mesa.git freedreno/a6xx: Disable the core layer-size setup. This was getting in the way of UBWC mipmap handling. Part-of: --- diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_resource.c b/src/gallium/drivers/freedreno/a6xx/fd6_resource.c index 04753f9e0dc..954024cfb12 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_resource.c +++ b/src/gallium/drivers/freedreno/a6xx/fd6_resource.c @@ -202,9 +202,5 @@ fd6_setup_slices(struct fd_resource *rsc) prsc->last_level + 1, prsc->array_size, prsc->target == PIPE_TEXTURE_3D, false); - /* The caller does this bit of layout setup again. */ - if (rsc->layout.layer_first) - return rsc->layout.size / prsc->array_size; - else - return rsc->layout.size; + return rsc->layout.size; } diff --git a/src/gallium/drivers/freedreno/freedreno_resource.c b/src/gallium/drivers/freedreno/freedreno_resource.c index 77b6cb5b6ca..0f48e5878ff 100644 --- a/src/gallium/drivers/freedreno/freedreno_resource.c +++ b/src/gallium/drivers/freedreno/freedreno_resource.c @@ -998,7 +998,8 @@ fd_resource_create_with_modifiers(struct pipe_screen *pscreen, return prsc; } - if (rsc->layout.layer_first) { + /* Set the layer size if the (non-a6xx) backend hasn't done so. */ + if (rsc->layout.layer_first && !rsc->layout.layer_size) { rsc->layout.layer_size = align(size, 4096); size = rsc->layout.layer_size * prsc->array_size; }