From: Eric Anholt Date: Tue, 12 May 2020 21:41:53 +0000 (-0700) Subject: freedreno: Fix resource layout dump loop. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a6fe0799faf73970ac76e26bac2f7b38195fe1e1;p=mesa.git 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: --- 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];