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: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
This commit is contained in:
Faith Ekstrand
2023-07-26 09:31:34 -05:00
committed by Marge Bot
parent a4367f2e3c
commit 27eb9af9d8
+10
View File
@@ -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");