fuchsia: Set tiling to linear if sysmem image uses host-visible memory.

For sysmem-backed images, if it uses host-visible memory,
the VkImage created on host always use linear tiling.
When we create VkImage using the VMO, we should set its
tiling to VK_IMAGE_TILING_LINEAR so that it could be
correctly sampled using linear tiling, while clients don't
need to know the exact tiling of that image.

This fixes sysmem images sampling on Intel and NVIDIA
host GPUs.

Change-Id: I62377795b5add05b577786d146b779365cb58da3
diff --git a/system/vulkan_enc/ResourceTracker.cpp b/system/vulkan_enc/ResourceTracker.cpp
index 0fae9f9..c04703e 100644
--- a/system/vulkan_enc/ResourceTracker.cpp
+++ b/system/vulkan_enc/ResourceTracker.cpp
@@ -3400,6 +3400,15 @@
                               GET_STATUS_SAFE(result, res));
                     }
                 }
+
+                if (info.settings.buffer_settings.heap ==
+                    llcpp::fuchsia::sysmem::HeapType::GOLDFISH_HOST_VISIBLE) {
+                    ALOGD(
+                        "%s: Image uses host visible memory heap; set tiling "
+                        "to linear to match host ImageCreateInfo",
+                        __func__);
+                    localCreateInfo.tiling = VK_IMAGE_TILING_LINEAR;
+                }
             }
             isSysmemBackedMemory = true;
         }