vulkan: Pull the device lost framework from ANV

It's a bit on the over-complicated side but the objective is to make the
debug log messages show up in the same thread as the first
VK_ERROR_DEVICE_LOST so we don't massively confuse the app.  It's
unknown if this is actually ever a problem but, with submit happening
off on its own thread, logging errors from threads the client doesn't
know about doesn't seem like a massively great plan.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13427>
This commit is contained in:
Jason Ekstrand
2021-10-19 18:32:28 -05:00
parent e6b4678fdb
commit dd89ef96d7
5 changed files with 126 additions and 0 deletions

View File

@@ -189,6 +189,10 @@ Core Mesa environment variables
overrides the WSI present mode clients specify in
``VkSwapchainCreateInfoKHR::presentMode``. Values can be ``fifo``,
``relaxed``, ``mailbox`` or ``immediate``.
:envvar:`MESA_VK_ABORT_ON_DEVICE_LOSS`
causes the Vulkan driver to call abort() immediately after detecting a
lost device. This is extremely useful when testing as it prevents the
test suite from continuing on with a lost device.
:envvar:`MESA_LOADER_DRIVER_OVERRIDE`
chooses a different driver binary such as ``etnaviv`` or ``zink``.