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:
parent
bbc6b5c3a7
commit
5eab5d6253
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user