summaryrefslogtreecommitdiffstats
path: root/tests/manual/qvulkaninstance/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/manual/qvulkaninstance/main.cpp')
-rw-r--r--tests/manual/qvulkaninstance/main.cpp43
1 files changed, 9 insertions, 34 deletions
diff --git a/tests/manual/qvulkaninstance/main.cpp b/tests/manual/qvulkaninstance/main.cpp
index 9b5f0ad072..48825b34f6 100644
--- a/tests/manual/qvulkaninstance/main.cpp
+++ b/tests/manual/qvulkaninstance/main.cpp
@@ -1,30 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include <QGuiApplication>
#include <QVulkanInstance>
@@ -178,7 +153,7 @@ void VWindow::init()
uint32_t queueCount = 0;
f->vkGetPhysicalDeviceQueueFamilyProperties(m_vkPhysDev, &queueCount, nullptr);
- QVector<VkQueueFamilyProperties> queueFamilyProps(queueCount);
+ QList<VkQueueFamilyProperties> queueFamilyProps(queueCount);
f->vkGetPhysicalDeviceQueueFamilyProperties(m_vkPhysDev, &queueCount, queueFamilyProps.data());
int gfxQueueFamilyIdx = -1;
int presQueueFamilyIdx = -1;
@@ -221,11 +196,11 @@ void VWindow::init()
queueInfo[1].pQueuePriorities = prio;
}
- QVector<const char *> devLayers;
- if (inst->layers().contains("VK_LAYER_LUNARG_standard_validation"))
- devLayers.append("VK_LAYER_LUNARG_standard_validation");
+ QList<const char *> devLayers;
+ if (inst->layers().contains("VK_LAYER_KHRONOS_validation"))
+ devLayers.append("VK_LAYER_KHRONOS_validation");
- QVector<const char *> devExts;
+ QList<const char *> devExts;
devExts.append("VK_KHR_swapchain");
VkDeviceCreateInfo devInfo;
@@ -314,7 +289,7 @@ void VWindow::recreateSwapChain()
uint32_t formatCount = 0;
m_vkGetPhysicalDeviceSurfaceFormatsKHR(m_vkPhysDev, m_vkSurface, &formatCount, nullptr);
if (formatCount) {
- QVector<VkSurfaceFormatKHR> formats(formatCount);
+ QList<VkSurfaceFormatKHR> formats(formatCount);
m_vkGetPhysicalDeviceSurfaceFormatsKHR(m_vkPhysDev, m_vkSurface, &formatCount, formats.data());
if (formats[0].format != VK_FORMAT_UNDEFINED) {
m_colorFormat = formats[0].format;
@@ -697,7 +672,7 @@ int main(int argc, char *argv[])
qDebug() << inst.supportedLayers() << inst.supportedExtensions();
// Enable validation layer, if supported.
- inst.setLayers(QByteArrayList() << "VK_LAYER_LUNARG_standard_validation");
+ inst.setLayers(QByteArrayList() << "VK_LAYER_KHRONOS_validation");
bool ok = inst.create();
qDebug("QVulkanInstance::create() returned %d", ok);