[vulkan] Fix error in ColorBuffer handle extraction
bug: 111137294
bug: 119426975
We should pull the local colorbuffer handle from the pNext
field of the local copy, not just the local copy itself.
Change-Id: I3aa4a3b2d2bd8788fa6183302b095112e62e11cc
diff --git a/system/vulkan_enc/ResourceTracker.cpp b/system/vulkan_enc/ResourceTracker.cpp
index 2a572fe..3738839 100644
--- a/system/vulkan_enc/ResourceTracker.cpp
+++ b/system/vulkan_enc/ResourceTracker.cpp
@@ -372,7 +372,9 @@
if (!cb_handle) return;
VkNativeBufferANDROID* nativeInfoOut =
- reinterpret_cast<VkNativeBufferANDROID*>(local_pCreateInfo);
+ reinterpret_cast<VkNativeBufferANDROID*>(
+ const_cast<void*>(
+ local_pCreateInfo->pNext));
if (!nativeInfoOut->handle) {
ALOGE("FATAL: Local native buffer info not properly allocated!");