Loading libs/hwui/renderthread/VulkanManager.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -172,6 +172,8 @@ void VulkanManager::setupDevice(GrVkExtensions& grExtensions, VkPhysicalDeviceFe LOG_ALWAYS_FATAL_IF(physDeviceProperties.apiVersion < VK_MAKE_VERSION(1, 1, 0)); mDriverVersion = physDeviceProperties.driverVersion; mIsQualcomm = physDeviceProperties.vendorID == 20803; // query to get the initial queue props size uint32_t queueCount; mGetPhysicalDeviceQueueFamilyProperties(mPhysicalDevice, &queueCount, nullptr); Loading libs/hwui/renderthread/VulkanManager.h +7 −0 Original line number Diff line number Diff line Loading @@ -181,6 +181,13 @@ private: SwapBehavior mSwapBehavior = SwapBehavior::Discard; GrVkExtensions mExtensions; uint32_t mDriverVersion = 0; // TODO: Remove once fix has landed. Temporaryly needed for workaround for setting up AHB // surfaces on Qualcomm. Currently if you don't use VkSwapchain Qualcomm is not setting // reporting that we need to use one of their private vendor usage bits which greatly effects // performance if it is not used. bool mIsQualcomm = false; bool isQualcomm() const { return mIsQualcomm; } }; } /* namespace renderthread */ Loading libs/hwui/renderthread/VulkanSurface.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -299,6 +299,10 @@ VulkanSurface* VulkanSurface::Create(ANativeWindow* window, ColorMode colorMode, } windowInfo.windowUsageFlags = hwbUsage.androidHardwareBufferUsage; if (vkManager.isQualcomm()) { windowInfo.windowUsageFlags = windowInfo.windowUsageFlags | AHARDWAREBUFFER_USAGE_VENDOR_0; } } else { ALOGE("VulkanSurface::Create() vkmGetPhysicalDeviceImageFormatProperties2 is missing"); Loading Loading
libs/hwui/renderthread/VulkanManager.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -172,6 +172,8 @@ void VulkanManager::setupDevice(GrVkExtensions& grExtensions, VkPhysicalDeviceFe LOG_ALWAYS_FATAL_IF(physDeviceProperties.apiVersion < VK_MAKE_VERSION(1, 1, 0)); mDriverVersion = physDeviceProperties.driverVersion; mIsQualcomm = physDeviceProperties.vendorID == 20803; // query to get the initial queue props size uint32_t queueCount; mGetPhysicalDeviceQueueFamilyProperties(mPhysicalDevice, &queueCount, nullptr); Loading
libs/hwui/renderthread/VulkanManager.h +7 −0 Original line number Diff line number Diff line Loading @@ -181,6 +181,13 @@ private: SwapBehavior mSwapBehavior = SwapBehavior::Discard; GrVkExtensions mExtensions; uint32_t mDriverVersion = 0; // TODO: Remove once fix has landed. Temporaryly needed for workaround for setting up AHB // surfaces on Qualcomm. Currently if you don't use VkSwapchain Qualcomm is not setting // reporting that we need to use one of their private vendor usage bits which greatly effects // performance if it is not used. bool mIsQualcomm = false; bool isQualcomm() const { return mIsQualcomm; } }; } /* namespace renderthread */ Loading
libs/hwui/renderthread/VulkanSurface.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -299,6 +299,10 @@ VulkanSurface* VulkanSurface::Create(ANativeWindow* window, ColorMode colorMode, } windowInfo.windowUsageFlags = hwbUsage.androidHardwareBufferUsage; if (vkManager.isQualcomm()) { windowInfo.windowUsageFlags = windowInfo.windowUsageFlags | AHARDWAREBUFFER_USAGE_VENDOR_0; } } else { ALOGE("VulkanSurface::Create() vkmGetPhysicalDeviceImageFormatProperties2 is missing"); Loading