Added few more stubs so that control reaches to DestroyDevice().
[mesa.git] / src / freedreno / fdl / freedreno_layout.c
index 0c50608ff156b7530cb31b0b70d630fb3d20efb7..c6dc5ecf769c894113f4aa1a86325ee052175ea6 100644 (file)
@@ -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];
 
@@ -56,9 +56,9 @@ fdl_dump_layout(struct fdl_layout *layout)
                                u_minify(layout->depth0, level),
                                layout->cpp, layout->nr_samples,
                                level,
-                               slice->pitch * layout->cpp,
+                               fdl_pitch(layout, level),
                                slice->size0, ubwc_slice->size0,
-                               slice->size0 / (slice->pitch * layout->cpp),
+                               slice->size0 / fdl_pitch(layout, level),
                                slice->offset, ubwc_slice->offset,
                                layout->layer_size, layout->ubwc_layer_size,
                                fdl_tile_mode(layout, level));