[Mesa-dev] [PATCH] egl: Mention if swrast is being forced

2019-10-31 Thread Chris Wilson
The system can be disabling HW acceleration unbeknowst to the user,
leading to a long debug session trying to work out which component is
failing. A quick mention that it is the environment override would be
very useful.
---
 src/egl/main/egldriver.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/egl/main/egldriver.c b/src/egl/main/egldriver.c
index 0d8919aa0e1..132b12ab4cb 100644
--- a/src/egl/main/egldriver.c
+++ b/src/egl/main/egldriver.c
@@ -92,6 +92,8 @@ _eglMatchDriver(_EGLDisplay *disp)
/* set options */
disp->Options.ForceSoftware =
   env_var_as_boolean("LIBGL_ALWAYS_SOFTWARE", false);
+   if (disp->Options.ForceSoftware)
+  _eglLog(_EGL_DEBUG, "Found 'LIBGL_ALWAYS_SOFTWARE' set, forcing swrast");
 
best_drv = _eglMatchAndInitialize(disp);
if (!best_drv && !disp->Options.ForceSoftware) {
-- 
2.24.0.rc1

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] egl: Mention if swrast is being forced

2019-10-31 Thread Tapani Pälli

Makes sense;

Reviewed-By: Tapani Pälli 

On 10/31/19 9:35 AM, Chris Wilson wrote:

The system can be disabling HW acceleration unbeknowst to the user,
leading to a long debug session trying to work out which component is
failing. A quick mention that it is the environment override would be
very useful.
---
  src/egl/main/egldriver.c | 2 ++
  1 file changed, 2 insertions(+)

diff --git a/src/egl/main/egldriver.c b/src/egl/main/egldriver.c
index 0d8919aa0e1..132b12ab4cb 100644
--- a/src/egl/main/egldriver.c
+++ b/src/egl/main/egldriver.c
@@ -92,6 +92,8 @@ _eglMatchDriver(_EGLDisplay *disp)
 /* set options */
 disp->Options.ForceSoftware =
env_var_as_boolean("LIBGL_ALWAYS_SOFTWARE", false);
+   if (disp->Options.ForceSoftware)
+  _eglLog(_EGL_DEBUG, "Found 'LIBGL_ALWAYS_SOFTWARE' set, forcing swrast");
  
 best_drv = _eglMatchAndInitialize(disp);

 if (!best_drv && !disp->Options.ForceSoftware) {


___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] egl: Mention if swrast is being forced

2019-10-31 Thread Emil Velikov
On Thu, 31 Oct 2019 at 07:35, Chris Wilson  wrote:
>
> The system can be disabling HW acceleration unbeknowst to the user,
Nit: s/unbeknownst/unknown/
unbeknowst isn't that common across non-native speakers, plus there's
a typo in it ;-)

> leading to a long debug session trying to work out which component is
> failing. A quick mention that it is the environment override would be
> very useful.

Reviewed-by: Emil Velikov 

-Emil
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] egl: Mention if swrast is being forced

2019-10-31 Thread Eric Engestrom
On Thursday, 2019-10-31 07:35:04 +, Chris Wilson wrote:
> The system can be disabling HW acceleration unbeknowst to the user,
> leading to a long debug session trying to work out which component is
> failing. A quick mention that it is the environment override would be
> very useful.
> ---
>  src/egl/main/egldriver.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/src/egl/main/egldriver.c b/src/egl/main/egldriver.c
> index 0d8919aa0e1..132b12ab4cb 100644
> --- a/src/egl/main/egldriver.c
> +++ b/src/egl/main/egldriver.c
> @@ -92,6 +92,8 @@ _eglMatchDriver(_EGLDisplay *disp)
> /* set options */
> disp->Options.ForceSoftware =
>env_var_as_boolean("LIBGL_ALWAYS_SOFTWARE", false);
> +   if (disp->Options.ForceSoftware)
> +  _eglLog(_EGL_DEBUG, "Found 'LIBGL_ALWAYS_SOFTWARE' set, forcing 
> swrast");

Good idea!
Reviewed-by: Eric Engestrom 

I might even suggest going one step further and make that an _EGL_WARNING,
so that users are always informed of this by default, without having to
set EGL_LOG_LEVEL.

I think most users don't want to disable their hardware, so the annoyance
if this warning showing up for users who want it should be completely
offset by the usefulness of this information for those who don't.

>  
> best_drv = _eglMatchAndInitialize(disp);
> if (!best_drv && !disp->Options.ForceSoftware) {
> -- 
> 2.24.0.rc1
> 
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev