diff options
author | Eric Anholt <[email protected]> | 2019-12-11 16:30:43 -0800 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-02-04 23:18:00 +0000 |
commit | f9f5d3eb554e6096b762744125580a239d3809b0 (patch) | |
tree | 90fe7035fbdfdc56ccb2801d576a4d3115de5bdf /src | |
parent | 17312b4a10718ee14a80e5c1b4e2e586d8a79920 (diff) |
freedreno/a6xx: Disable the core layer-size setup.
This was getting in the way of UBWC mipmap handling.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3059>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/freedreno/a6xx/fd6_resource.c | 6 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/freedreno_resource.c | 3 |
2 files changed, 3 insertions, 6 deletions
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; } |