From 0b3829063d4a6ce528bd073f14d5d0aa35c7182c Mon Sep 17 00:00:00 2001 From: Roman Kiryanov <rkir@google.com> Date: Thu, 25 Apr 2019 15:36:20 -0700 Subject: [PATCH] Put the AHB format to externalFormat Other parts of the code expect to see an AHB format there. The format field is ignored if externalFormat is set. Bug: 131181334 Test: make Change-Id: I509f608f66f2cd5c354beebb9500ab6a79fb6568 Merged-In: Ic34c6a2bea57c0008cceb99b5a50f79392092b14 Signed-off-by: Roman Kiryanov <rkir@google.com> --- system/vulkan_enc/AndroidHardwareBuffer.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/system/vulkan_enc/AndroidHardwareBuffer.cpp b/system/vulkan_enc/AndroidHardwareBuffer.cpp index fd04797..05f14f1 100644 --- a/system/vulkan_enc/AndroidHardwareBuffer.cpp +++ b/system/vulkan_enc/AndroidHardwareBuffer.cpp @@ -76,10 +76,8 @@ VkResult getAndroidHardwareBufferPropertiesANDROID( return VK_ERROR_INVALID_EXTERNAL_HANDLE; } - ahbFormatProps->format = - vk_format_from_android(desc.format); - - ahbFormatProps->externalFormat = VK_FORMAT_G8B8G8R8_422_UNORM; + ahbFormatProps->format = VK_FORMAT_UNDEFINED; + ahbFormatProps->externalFormat = desc.format; // The formatFeatures member must include // VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT and at least one of -- GitLab