vulkan/queue: Rework submit thread enabling
authorJason Ekstrand <jason.ekstrand@collabora.com>
Thu, 24 Mar 2022 22:33:57 +0000 (17:33 -0500)
committerMarge Bot <emma+marge@anholt.net>
Wed, 30 Mar 2022 23:17:56 +0000 (23:17 +0000)
commite0ffdc8ce0b5813940c20f2055477d0d95ba1a1a
tree458fa7fb9914ea2ca3cc3483cef38067f20f3aa4
parent9ddab162b7841d440523a094ef7005bb79cc8d16
vulkan/queue: Rework submit thread enabling

Now that we have a threading mode in the device, we can set that based
on the environment variable instead of delaying it to submit time.  This
allows us to avoid the static variable trickery we use to avoid reading
environment variables over and over again.  We also move the enabling of
the submit thread up a level or two and give it a bit more obvious
condition.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15566>
src/vulkan/runtime/vk_device.c
src/vulkan/runtime/vk_queue.c