Gralloc: Pass layer_count to adreno size calculation APIs

Pass layer_count to adreno to get final, aligned and layer counted
size.

Change-Id: Idf7c5a0077819ea97011f8377e0e3e529038d954
diff --git a/gralloc/gr_utils.cpp b/gralloc/gr_utils.cpp
index 0436c2a..a49f1ea 100644
--- a/gralloc/gr_utils.cpp
+++ b/gralloc/gr_utils.cpp
@@ -960,9 +960,12 @@
   }
 
   // Call adreno api for populating metadata blob
+  // Layer count is for 2D/Cubemap arrays and depth is used for 3D slice
+  // Using depth to pass layer_count here
   int ret = adreno_mem_info->AdrenoInitMemoryLayout(graphics_metadata->data, info.width,
-                                                    info.height, 1, info.format, 1,
-                                                    is_ubwc_enabled, adreno_usage, 1);
+                                                    info.height, info.layer_count, /* depth */
+                                                    info.format, 1, is_ubwc_enabled,
+                                                    adreno_usage, 1);
   if (ret != 0) {
     ALOGE("%s Graphics metadata init failed", __FUNCTION__);
     *size = 0;