Update VkHardwareBufferTest to also fallback for ahb mem type

Aligns with https://skia-review.googlesource.com/c/skia/+/709099

Bug: b/286465032
Test: UnitTest_VulkanHardwareBuffer_CPU_Vulkan
Change-Id: I2cd076b3e436ea3f9aa6d4956b7e9cc0cd3ab014
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/709756
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Auto-Submit: Yiwei Zhang <zzyiwei@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
diff --git a/tests/VkHardwareBufferTest.cpp b/tests/VkHardwareBufferTest.cpp
index 59cd1cc..a2eefed 100644
--- a/tests/VkHardwareBufferTest.cpp
+++ b/tests/VkHardwareBufferTest.cpp
@@ -752,6 +752,13 @@
             }
         }
     }
+
+    // Fallback to align with GrAHardwareBufferUtils
+    if (!foundHeap && hwbProps.memoryTypeBits) {
+        typeIndex = ffs(hwbProps.memoryTypeBits) - 1;
+        foundHeap = true;
+    }
+
     if (!foundHeap) {
         ERRORF(reporter, "Failed to find valid heap for imported memory");
         return false;