NAK.  There's really no reason to do this.  If you're in the lost device
case, you've just done an ioctl (expensive) and got a GPU hang (5 second
watchdog timer).  Also, it adds complexity to something that very badly
needs to "just work".

--Jason

On Tue, Oct 30, 2018 at 11:09 AM Eric Engestrom <eric.engest...@intel.com>
wrote:

> Suggested-by: Emil Velikov <emil.l.veli...@gmail.com>
> Signed-off-by: Eric Engestrom <eric.engest...@intel.com>
> ---
>  src/intel/vulkan/anv_device.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
> index ee35e013329005671391..d0e83546b1197e362874 100644
> --- a/src/intel/vulkan/anv_device.c
> +++ b/src/intel/vulkan/anv_device.c
> @@ -2064,7 +2064,13 @@ _anv_device_set_lost(struct anv_device *device,
>                       VK_ERROR_DEVICE_LOST, file, line, msg, ap);
>     va_end(ap);
>
> -   if (env_var_as_boolean("ANV_ABORT_ON_DEVICE_LOSS", false))
> +   static bool abort_on_device_loss, env_read;
> +   if (!env_read) {
> +      abort_on_device_loss =
> env_var_as_boolean("ANV_ABORT_ON_DEVICE_LOSS", false);
> +      env_read = true;
> +   }
> +
> +   if (abort_on_device_loss)
>        abort();
>
>     return err;
> --
> Cheers,
>   Eric
>
>
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to