From 27eb9af9d804c9daa4a89615a59012abd3f54ccb Mon Sep 17 00:00:00 2001 From: Faith Ekstrand Date: Wed, 26 Jul 2023 09:31:34 -0500 Subject: [PATCH] nvk: Require an environment variable for poorly tested hardware We really only know that Turing and Ampere work right now. Maxwell has recieved some testing but still can't survive a CTS run. Other hardware is even less well tested. Part-of: --- src/nouveau/vulkan/nvk_physical_device.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/nouveau/vulkan/nvk_physical_device.c b/src/nouveau/vulkan/nvk_physical_device.c index 0f2993fae5b..a9a446a0046 100644 --- a/src/nouveau/vulkan/nvk_physical_device.c +++ b/src/nouveau/vulkan/nvk_physical_device.c @@ -31,6 +31,7 @@ #include "clc597.h" #include "clc5c0.h" #include "clc597.h" +#include "clc997.h" VKAPI_ATTR void VKAPI_CALL nvk_GetPhysicalDeviceProperties2(VkPhysicalDevice physicalDevice, @@ -643,6 +644,15 @@ nvk_create_drm_physical_device(struct vk_instance *_instance, if (info.cls_eng3d < KEPLER_A) return VK_ERROR_INCOMPATIBLE_DRIVER; + if ((info.cls_eng3d < TURING_A || info.cls_eng3d > ADA_A) && + !debug_get_bool_option("NVK_I_WANT_A_BROKEN_VULKAN_DRIVER", false)) { + return vk_errorf(instance, VK_ERROR_INCOMPATIBLE_DRIVER, + "WARNING: NVK is not well-tested on %s, pass " + "NVK_I_WANT_A_BROKEN_VULKAN_DRIVER=1 " + "if you know what you're doing.", + info.device_name); + } + if (!(drm_device->available_nodes & (1 << DRM_NODE_RENDER))) { return vk_errorf(instance, VK_ERROR_INITIALIZATION_FAILED, "NVK requires a render node");