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>
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 @@
             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