summaryrefslogtreecommitdiff
path: root/gralloc/gr_utils.cpp
diff options
context:
space:
mode:
authorSaurabh Dubey <sdubey@codeaurora.org>2018-05-15 16:20:10 +0530
committerSaurabh Dubey <sdubey@codeaurora.org>2018-05-29 09:48:28 +0530
commitb637bb36ada1090ef442c3265f615c74b9422e29 (patch)
tree7c45ad7bbffd93fe18057f25435b2ed43ebe104f /gralloc/gr_utils.cpp
parent70957381925464e0e283433efea93c00186ececc (diff)
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
Diffstat (limited to 'gralloc/gr_utils.cpp')
-rw-r--r--gralloc/gr_utils.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/gralloc/gr_utils.cpp b/gralloc/gr_utils.cpp
index 0436c2ae..a49f1eab 100644
--- a/gralloc/gr_utils.cpp
+++ b/gralloc/gr_utils.cpp
@@ -960,9 +960,12 @@ void GetGpuResourceSizeAndDimensions(const BufferInfo &info, unsigned int *size,
}
// 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;