From a6fe0799faf73970ac76e26bac2f7b38195fe1e1 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 12 May 2020 14:41:53 -0700 Subject: [PATCH] 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: --- src/freedreno/fdl/freedreno_layout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]; -- 2.30.2