aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2020-05-12 14:41:53 -0700
committerMarge Bot <[email protected]>2020-05-14 14:12:15 +0000
commita6fe0799faf73970ac76e26bac2f7b38195fe1e1 (patch)
tree4423f65c49b239f5a9a010dfa4cc40cd05c6c2c1
parent2eb180db94830a70e21770e3a972efc55ee8385a (diff)
freedreno: Fix resource layout dump loop.
Apparently I've never dumped a fully populated slices array, so the 0-init always terminated the loop. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5020>
-rw-r--r--src/freedreno/fdl/freedreno_layout.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/freedreno/fdl/freedreno_layout.c b/src/freedreno/fdl/freedreno_layout.c
index 9f8f660b80a..226382f271a 100644
--- a/src/freedreno/fdl/freedreno_layout.c
+++ b/src/freedreno/fdl/freedreno_layout.c
@@ -45,7 +45,7 @@ fdl_layout_buffer(struct fdl_layout *layout, uint32_t size)
void
fdl_dump_layout(struct fdl_layout *layout)
{
- for (uint32_t level = 0; level < layout->slices[level].size0; level++) {
+ for (uint32_t level = 0; level < ARRAY_SIZE(layout->slices) && layout->slices[level].size0; level++) {
struct fdl_slice *slice = &layout->slices[level];
struct fdl_slice *ubwc_slice = &layout->ubwc_slices[level];