From 42bb760c8d8486d1d314cb133fbc2f750fbba960 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Sun, 10 Apr 2022 20:19:06 -0400 Subject: [PATCH] zink: remove compiled conditional for lavapipe usage this is super annoying since it means that a build of zink cannot be mix-and-matched with an existing build of lavapipe, e.g., for faster bisecting the env var should be sufficient to handle this, and if someone sets it and doesn't have swrast enabled then they can deal with it Acked-by: Dave Airlie Part-of: --- src/gallium/drivers/zink/meson.build | 4 ---- src/gallium/drivers/zink/zink_screen.c | 3 +-- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/gallium/drivers/zink/meson.build b/src/gallium/drivers/zink/meson.build index 07fce04832b..f8ecef41e40 100644 --- a/src/gallium/drivers/zink/meson.build +++ b/src/gallium/drivers/zink/meson.build @@ -79,10 +79,6 @@ zink_nir_algebraic_c = custom_target( zink_c_args = [] inc_zink_vk = [] -if with_swrast_vk - zink_c_args += '-DZINK_WITH_SWRAST_VK' -endif - # MoltenVK options if with_moltenvk_dir != '' inc_zink_vk = [inc_zink_vk, include_directories( join_paths(with_moltenvk_dir, 'include') )] diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c index 7e162cb42fe..0501406ba5c 100644 --- a/src/gallium/drivers/zink/zink_screen.c +++ b/src/gallium/drivers/zink/zink_screen.c @@ -1283,7 +1283,6 @@ choose_pdev(struct zink_screen *screen) for (i = 0; i < pdev_count; ++i) { vkGetPhysicalDeviceProperties(pdevs[i], props); -#ifdef ZINK_WITH_SWRAST_VK char *use_lavapipe = getenv("ZINK_USE_LAVAPIPE"); if (use_lavapipe) { if (props->deviceType == VK_PHYSICAL_DEVICE_TYPE_CPU) { @@ -1294,7 +1293,7 @@ choose_pdev(struct zink_screen *screen) } continue; } -#endif + if (props->deviceType != VK_PHYSICAL_DEVICE_TYPE_CPU) { screen->pdev = pdevs[i]; screen->info.device_version = props->apiVersion;