Module: Mesa Branch: master Commit: a6fe0799faf73970ac76e26bac2f7b38195fe1e1 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a6fe0799faf73970ac76e26bac2f7b38195fe1e1
Author: Eric Anholt <[email protected]> Date: Tue May 12 14:41:53 2020 -0700 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> --- 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]; _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
