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 <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16572>
This commit is contained in:
Mike Blumenkrantz 2022-05-03 19:14:00 -04:00
parent 2b844aab6a
commit 43b3f5469d

View file

@ -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];