From 43b3f5469d3ce78dec46cad28a5b020e6f7b56c4 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Tue, 3 May 2022 19:14:00 -0400 Subject: [PATCH] zink: never create a sw context unless sw is requested this otherwise makes it impossible to accurately do hardware driver fallback, as zink will create a sw context instead of failing, superceding the actual sw driver priorities Reviewed-by: Dave Airlie Part-of: --- src/gallium/drivers/zink/zink_screen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/zink/zink_screen.c b/src/gallium/drivers/zink/zink_screen.c index 35a8f7e..01741a7 100644 --- a/src/gallium/drivers/zink/zink_screen.c +++ b/src/gallium/drivers/zink/zink_screen.c @@ -1336,7 +1336,7 @@ choose_pdev(struct zink_screen *screen) } } is_cpu = cur_prio == prio_map[VK_PHYSICAL_DEVICE_TYPE_CPU]; - if (cpu && !is_cpu) + if (cpu != is_cpu) goto out; screen->pdev = pdevs[idx]; -- 2.7.4