rhi: vk: Switch to the modern validation layer internally

Task-number: QTBUG-88388
Change-Id: Ia30af6c4554594f094af7866ad6e10ed7929de27
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
This commit is contained in:
Laszlo Agocs 2021-05-21 19:05:19 +02:00
parent bbc6b5c3a7
commit 5eab5d6253
2 changed files with 4 additions and 25 deletions

View File

@ -104,18 +104,7 @@ QT_BEGIN_NAMESPACE
...
QVulkanInstance inst;
#ifndef Q_OS_ANDROID
inst.setLayers(QByteArrayList() << "VK_LAYER_LUNARG_standard_validation");
#else
inst.setLayers(QByteArrayList()
<< "VK_LAYER_GOOGLE_threading"
<< "VK_LAYER_LUNARG_parameter_validation"
<< "VK_LAYER_LUNARG_object_tracker"
<< "VK_LAYER_LUNARG_core_validation"
<< "VK_LAYER_LUNARG_image"
<< "VK_LAYER_LUNARG_swapchain"
<< "VK_LAYER_GOOGLE_unique_objects");
#endif
inst.setLayers({ "VK_LAYER_KHRONOS_validation" }); // for debugging only, not for release builds
inst.setExtensions(QRhiVulkanInitParams::preferredInstanceExtensions());
if (!inst.create())
qFatal("Vulkan not available");
@ -549,8 +538,8 @@ bool QRhiVulkan::create(QRhi::Flags flags)
queueInfo[0].pQueuePriorities = prio;
QList<const char *> devLayers;
if (inst->layers().contains("VK_LAYER_LUNARG_standard_validation"))
devLayers.append("VK_LAYER_LUNARG_standard_validation");
if (inst->layers().contains("VK_LAYER_KHRONOS_validation"))
devLayers.append("VK_LAYER_KHRONOS_validation");
QVulkanInfoVector<QVulkanExtension> devExts;
uint32_t devExtCount = 0;

View File

@ -169,17 +169,7 @@ void tst_QRhi::initTestCase()
#endif
#ifdef TST_VK
#ifndef Q_OS_ANDROID
vulkanInstance.setLayers({ QByteArrayLiteral("VK_LAYER_LUNARG_standard_validation") });
#else
vulkanInstance.setLayers({ QByteArrayLiteral("VK_LAYER_GOOGLE_threading"),
QByteArrayLiteral("VK_LAYER_LUNARG_parameter_validation"),
QByteArrayLiteral("VK_LAYER_LUNARG_object_tracker"),
QByteArrayLiteral("VK_LAYER_LUNARG_core_validation"),
QByteArrayLiteral("VK_LAYER_LUNARG_image"),
QByteArrayLiteral("VK_LAYER_LUNARG_swapchain"),
QByteArrayLiteral("VK_LAYER_GOOGLE_unique_objects") });
#endif
vulkanInstance.setLayers({ "VK_LAYER_KHRONOS_validation" });
vulkanInstance.setExtensions(QRhiVulkanInitParams::preferredInstanceExtensions());
vulkanInstance.create();
initParams.vk.inst = &vulkanInstance;