Blame SOURCES/lavapipe-disable-env-var.patch

af8123
diff -up mesa-21.3.0/src/gallium/frontends/lavapipe/lvp_device.cdma mesa-21.3.0/src/gallium/frontends/lavapipe/lvp_device.c
af8123
--- mesa-21.3.0/src/gallium/frontends/lavapipe/lvp_device.cdma	2021-11-18 06:16:20.000000000 +1000
af8123
+++ mesa-21.3.0/src/gallium/frontends/lavapipe/lvp_device.c	2021-11-18 07:03:17.652283186 +1000
af8123
@@ -213,6 +213,9 @@ VKAPI_ATTR VkResult VKAPI_CALL lvp_Creat
38d2b7
    if (pAllocator == NULL)
af8123
       pAllocator = vk_default_allocator();
b23678
 
b23678
+   if (!getenv("RH_SW_VULKAN"))
b23678
+      return VK_ERROR_INITIALIZATION_FAILED;
b23678
+
38d2b7
    instance = vk_zalloc(pAllocator, sizeof(*instance), 8,
38d2b7
                         VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE);
b23678
    if (!instance)