rhi: manual tests: Switch to VK_LAYER_KHRONOS_validation
Task-number: QTBUG-88388 Change-Id: Ia6d7caf0357b017625d3245a72d21a3023d81035 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
This commit is contained in:
parent
82499a6a28
commit
0199640d44
@ -126,18 +126,7 @@ int main(int argc, char **argv)
|
|||||||
#if QT_CONFIG(vulkan)
|
#if QT_CONFIG(vulkan)
|
||||||
QVulkanInstance inst;
|
QVulkanInstance inst;
|
||||||
if (graphicsApi == QRhi::Vulkan) {
|
if (graphicsApi == QRhi::Vulkan) {
|
||||||
#ifndef Q_OS_ANDROID
|
inst.setLayers({ "VK_LAYER_KHRONOS_validation" });
|
||||||
inst.setLayers({ "VK_LAYER_LUNARG_standard_validation" });
|
|
||||||
#else
|
|
||||||
inst.setLayers({
|
|
||||||
"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.setExtensions(QRhiVulkanInitParams::preferredInstanceExtensions());
|
inst.setExtensions(QRhiVulkanInitParams::preferredInstanceExtensions());
|
||||||
if (!inst.create()) {
|
if (!inst.create()) {
|
||||||
qWarning("Failed to create Vulkan instance, switching to OpenGL");
|
qWarning("Failed to create Vulkan instance, switching to OpenGL");
|
||||||
|
@ -561,18 +561,7 @@ int main(int argc, char **argv)
|
|||||||
#if QT_CONFIG(vulkan)
|
#if QT_CONFIG(vulkan)
|
||||||
r.instance = new QVulkanInstance;
|
r.instance = new QVulkanInstance;
|
||||||
if (graphicsApi == Vulkan) {
|
if (graphicsApi == Vulkan) {
|
||||||
#ifndef Q_OS_ANDROID
|
r.instance->setLayers({ "VK_LAYER_KHRONOS_validation" });
|
||||||
r.instance->setLayers({ "VK_LAYER_LUNARG_standard_validation" });
|
|
||||||
#else
|
|
||||||
r.instance->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
|
|
||||||
if (!r.instance->create()) {
|
if (!r.instance->create()) {
|
||||||
qWarning("Failed to create Vulkan instance, switching to OpenGL");
|
qWarning("Failed to create Vulkan instance, switching to OpenGL");
|
||||||
graphicsApi = OpenGL;
|
graphicsApi = OpenGL;
|
||||||
|
@ -763,18 +763,7 @@ int main(int argc, char **argv)
|
|||||||
#if QT_CONFIG(vulkan)
|
#if QT_CONFIG(vulkan)
|
||||||
instance = new QVulkanInstance;
|
instance = new QVulkanInstance;
|
||||||
if (graphicsApi == Vulkan) {
|
if (graphicsApi == Vulkan) {
|
||||||
#ifndef Q_OS_ANDROID
|
instance->setLayers({ "VK_LAYER_KHRONOS_validation" });
|
||||||
instance->setLayers({ "VK_LAYER_LUNARG_standard_validation" });
|
|
||||||
#else
|
|
||||||
instance->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
|
|
||||||
if (!instance->create()) {
|
if (!instance->create()) {
|
||||||
qWarning("Failed to create Vulkan instance, switching to OpenGL");
|
qWarning("Failed to create Vulkan instance, switching to OpenGL");
|
||||||
graphicsApi = OpenGL;
|
graphicsApi = OpenGL;
|
||||||
|
@ -175,18 +175,7 @@ int main(int argc, char **argv)
|
|||||||
QVulkanInstance inst;
|
QVulkanInstance inst;
|
||||||
if (graphicsApi == Vulkan) {
|
if (graphicsApi == Vulkan) {
|
||||||
QLoggingCategory::setFilterRules(QStringLiteral("qt.vulkan=true"));
|
QLoggingCategory::setFilterRules(QStringLiteral("qt.vulkan=true"));
|
||||||
#ifndef Q_OS_ANDROID
|
inst.setLayers({ "VK_LAYER_KHRONOS_validation" });
|
||||||
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
|
|
||||||
if (inst.create()) {
|
if (inst.create()) {
|
||||||
QRhiVulkanInitParams params;
|
QRhiVulkanInitParams params;
|
||||||
params.inst = &inst;
|
params.inst = &inst;
|
||||||
|
@ -536,18 +536,7 @@ int main(int argc, char **argv)
|
|||||||
if (graphicsApi == Vulkan) {
|
if (graphicsApi == Vulkan) {
|
||||||
if (debugLayer) {
|
if (debugLayer) {
|
||||||
qDebug("Enabling Vulkan validation layer (if available)");
|
qDebug("Enabling Vulkan validation layer (if available)");
|
||||||
#ifndef Q_OS_ANDROID
|
inst.setLayers({ "VK_LAYER_KHRONOS_validation" });
|
||||||
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.setExtensions(QRhiVulkanInitParams::preferredInstanceExtensions());
|
inst.setExtensions(QRhiVulkanInitParams::preferredInstanceExtensions());
|
||||||
if (!inst.create()) {
|
if (!inst.create()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user