Merge "Remove workaround in VulkanSurface for missing vendor flag." into qt-dev
This commit is contained in:
@@ -167,8 +167,6 @@ void VulkanManager::setupDevice(GrVkExtensions& grExtensions, VkPhysicalDeviceFe
|
|||||||
LOG_ALWAYS_FATAL_IF(physDeviceProperties.apiVersion < VK_MAKE_VERSION(1, 1, 0));
|
LOG_ALWAYS_FATAL_IF(physDeviceProperties.apiVersion < VK_MAKE_VERSION(1, 1, 0));
|
||||||
mDriverVersion = physDeviceProperties.driverVersion;
|
mDriverVersion = physDeviceProperties.driverVersion;
|
||||||
|
|
||||||
mIsQualcomm = physDeviceProperties.vendorID == 20803;
|
|
||||||
|
|
||||||
// query to get the initial queue props size
|
// query to get the initial queue props size
|
||||||
uint32_t queueCount;
|
uint32_t queueCount;
|
||||||
mGetPhysicalDeviceQueueFamilyProperties(mPhysicalDevice, &queueCount, nullptr);
|
mGetPhysicalDeviceQueueFamilyProperties(mPhysicalDevice, &queueCount, nullptr);
|
||||||
|
|||||||
@@ -179,13 +179,6 @@ private:
|
|||||||
SwapBehavior mSwapBehavior = SwapBehavior::Discard;
|
SwapBehavior mSwapBehavior = SwapBehavior::Discard;
|
||||||
GrVkExtensions mExtensions;
|
GrVkExtensions mExtensions;
|
||||||
uint32_t mDriverVersion = 0;
|
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 */
|
} /* namespace renderthread */
|
||||||
|
|||||||
@@ -297,11 +297,6 @@ VulkanSurface* VulkanSurface::Create(ANativeWindow* window, ColorMode colorMode,
|
|||||||
native_window_get_consumer_usage(window, &consumerUsage);
|
native_window_get_consumer_usage(window, &consumerUsage);
|
||||||
windowInfo.windowUsageFlags = consumerUsage | hwbUsage.androidHardwareBufferUsage;
|
windowInfo.windowUsageFlags = consumerUsage | hwbUsage.androidHardwareBufferUsage;
|
||||||
|
|
||||||
if (vkManager.isQualcomm()) {
|
|
||||||
windowInfo.windowUsageFlags =
|
|
||||||
windowInfo.windowUsageFlags | AHARDWAREBUFFER_USAGE_VENDOR_0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Now we attempt to modify the window!
|
* Now we attempt to modify the window!
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user