Mesa (master): freedreno/a6xx: Disable the core layer-size setup.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Feb 4 23:35:04 UTC 2020
Module: Mesa
Branch: master
Commit: f9f5d3eb554e6096b762744125580a239d3809b0
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f9f5d3eb554e6096b762744125580a239d3809b0
Author: Eric Anholt <eric at anholt.net>
Date: Wed Dec 11 16:30:43 2019 -0800
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>
---
src/gallium/drivers/freedreno/a6xx/fd6_resource.c | 6 +-----
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;
}
More information about the mesa-commit
mailing list