From 47b0536ba2f7a1548c63edba0a4a62b041bc6d22 Mon Sep 17 00:00:00 2001 From: Gurchetan Singh Date: Mon, 29 Apr 2024 18:07:14 -0700 Subject: [PATCH] gfxstream: always advertise device memory extension guest side memory report extension is present. It's is filtered out when sent host side, since for a virtual GPU this is quite difficult to implement. Mesa runtime is picky about physical device features. So if the test tries to enable device level extension without it definitely existing, the test will fail. The test can also be modified to check VkPhysicalDeviceDeviceMemoryReportFeaturesEXT, but that's more involved. Work around this by always advertising the extension. Reviewed-by: Aaron Ruby Acked-by: Yonggang Luo Acked-by: Adam Jackson Part-of: --- src/gfxstream/guest/vulkan_enc/ResourceTracker.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/gfxstream/guest/vulkan_enc/ResourceTracker.cpp b/src/gfxstream/guest/vulkan_enc/ResourceTracker.cpp index 030b9f6a532..ddd481554a7 100644 --- a/src/gfxstream/guest/vulkan_enc/ResourceTracker.cpp +++ b/src/gfxstream/guest/vulkan_enc/ResourceTracker.cpp @@ -1824,6 +1824,20 @@ VkResult ResourceTracker::on_vkEnumerateDeviceExtensionProperties( filteredExts.push_back(anbExtProp); } + /* + * GfxstreamEnd2EndVkTest::DeviceMemoryReport always assumes the memory report + * extension is present. It's is filtered out when sent host side, since for a + * virtual GPU this is quite difficult to implement. + * + * Mesa runtime checks physical device features. So if the test tries to enable + * device level extension without it definitely existing, the test will fail. + * + * The test can also be modified to check VkPhysicalDeviceDeviceMemoryReportFeaturesEXT, + * but that's more involved. Work around this by always advertising the extension. + * Tracking bug: b/338270042 + */ + filteredExts.push_back(VkExtensionProperties{"VK_EXT_device_memory_report", 1}); + #if defined(VK_USE_PLATFORM_ANDROID_KHR) || defined(__linux__) bool hostSupportsExternalFenceFd = getHostDeviceExtensionIndex("VK_KHR_external_fence_fd") != -1;