[Mesa-dev] [PATCH 3/3] anv: Handle the device loss abort in anv_device_set_lost

Emil Velikov emil.l.velikov at gmail.com
Tue Oct 30 15:03:41 UTC 2018


On Thu, 25 Oct 2018 at 17:47, Jason Ekstrand <jason at jlekstrand.net> wrote:
>
> ---
>  src/intel/vulkan/anv_device.c | 11 +++++++++++
>  src/intel/vulkan/anv_util.c   |  4 ----
>  2 files changed, 11 insertions(+), 4 deletions(-)
>
> diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
> index 79d3f052113..d62bdde078c 100644
> --- a/src/intel/vulkan/anv_device.c
> +++ b/src/intel/vulkan/anv_device.c
> @@ -2053,6 +2053,17 @@ void
>  anv_device_set_lost(struct anv_device *device, const char *msg, ...)
>  {
>     device->_lost = true;
> +
> +   if (env_var_as_boolean("ANV_ABORT_ON_DEVICE_LOSS", false)) {

If you're interested in shaving a micro second or two, you can do the
env_var_as_boolean once per device/instance/other.
Admittedly if the developer hits this path they have far greater
problems to deal with ;-)

HTH
Emil


More information about the mesa-dev mailing list