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

2019-11-11 Thread Martin Peres
On 31/10/2019 09:35, 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");

Maybe we want to remain generic rather than just saying swrast, but not
sure if LIBGL_ALWAYS_SOFTWARE would enable llvmpipe if available rather
than swrast. Maybe we can say "will use a CPU renderer".

In any case, the change is:
Acked-by: Martin Peres 

Martin

>  
> 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-11-11 Thread Erik Faye-Lund
On Mon, 2019-11-11 at 10:44 +0200, Martin Peres wrote:
> On 31/10/2019 09:35, 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");
> 
> Maybe we want to remain generic rather than just saying swrast, but
> not
> sure if LIBGL_ALWAYS_SOFTWARE would enable llvmpipe if available
> rather
> than swrast. Maybe we can say "will use a CPU renderer".
> 

Yes, it will pick up llvmpipe usually. Or SWR. It can even pick up Zink
exposed as an software-rasterizer, if enabled. But Zink IIRC is the
last resort.


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

Re: [Mesa-dev] [PATCH] llvmpipe: Check thread creation errors

2019-11-11 Thread Nathan Kidd

Thanks.  I'll have to rely on someone with a commit bit to push this.

On 2019-11-10 4:55 p.m., Roland Scheidegger wrote:
> Looks great to me.
> Reviewed-by: Roland Scheidegger 
> 
> Am 08.11.19 um 23:05 schrieb Nathan Kidd:
>> In the case of glibc, pthread_t is internally a pointer.  If
>> lp_rast_destroy() passes a 0-value pthread_t to pthread_join(), the
>> latter will SEGV dereferencing it.
>>
>> pthread_create() can fail if either the user's ulimit -u or Linux
>> kernel's /proc/sys/kernel/threads-max is reached.
>>
>> Choosing to continue, rather than fail, on theory that it is better to
>> run with the one main thread, than not run at all.
>>
>> Keeping as many threads as we got, since lack of threads severely
>> degrades llvmpipe performance.
>>
>> Signed-off-by: Nathan Kidd 
>> ---
>>  src/gallium/drivers/llvmpipe/lp_rast.c | 4 
>>  1 file changed, 4 insertions(+)
>>
>> diff --git a/src/gallium/drivers/llvmpipe/lp_rast.c
>> b/src/gallium/drivers/llvmpipe/lp_rast.c
>> index d50e92b..ef783ea 100644
>> --- a/src/gallium/drivers/llvmpipe/lp_rast.c
>> +++ b/src/gallium/drivers/llvmpipe/lp_rast.c
>> @@ -867,6 +867,10 @@ create_rast_threads(struct lp_rasterizer *rast)
>>pipe_semaphore_init(&rast->tasks[i].work_done, 0);
>>rast->threads[i] = u_thread_create(thread_function,
>>  (void *) &rast->tasks[i]);
>> +  if (!rast->threads[i]) {
>> + rast->num_threads = i; /* previous thread is max */
>> + break;
>> +  }
>> }
>>  }
>>  -- 1.8.3.1
>>
>>
>> ___
>> mesa-dev mailing list
>> mesa-dev@lists.freedesktop.org
>> https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Fmesa-dev&data=02%7C01%7Csroland%40vmware.com%7C89a950ed76af42db159608d7649a0d7f%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C1%7C637088485136387009&sdata=NT1iuAGZTnoJErKVkS2RbobIj5ufzYI2n0j3FIYxxUY%3D&reserved=0
>>
> 
> 

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

[Mesa-dev] [PATCH] nir: fix a couple signed/unsigned comparison warnings in nir_builder.h

2019-11-11 Thread Brian Paul
---
 src/compiler/nir/nir_builder.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/compiler/nir/nir_builder.h b/src/compiler/nir/nir_builder.h
index de00fe7..aed4759 100644
--- a/src/compiler/nir/nir_builder.h
+++ b/src/compiler/nir/nir_builder.h
@@ -782,7 +782,7 @@ nir_extract_bits(nir_builder *b, nir_ssa_def **srcs, 
unsigned num_srcs,
for (unsigned i = 0; i < num_srcs; i++)
   common_bit_size = MIN2(common_bit_size, srcs[i]->bit_size);
if (first_bit > 0)
-  common_bit_size = MIN2(common_bit_size, (1 << (ffs(first_bit) - 1)));
+  common_bit_size = MIN2(common_bit_size, (1u << (ffs(first_bit) - 1)));
 
/* We don't want to have to deal with 1-bit values */
assert(common_bit_size >= 8);
@@ -800,7 +800,7 @@ nir_extract_bits(nir_builder *b, nir_ssa_def **srcs, 
unsigned num_srcs,
   const unsigned bit = first_bit + (i * common_bit_size);
   while (bit >= src_end_bit) {
  src_idx++;
- assert(src_idx < num_srcs);
+ assert(src_idx < (int) num_srcs);
  src_start_bit = src_end_bit;
  src_end_bit += srcs[src_idx]->bit_size *
 srcs[src_idx]->num_components;
-- 
1.8.5.6

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

[Mesa-dev] [PATCH] s/APIENTRY/GLAPIENTRY/ in teximage.c

2019-11-11 Thread Brian Paul
The later is the right symbol for entrypoint functions.
---
 src/mesa/main/texgetimage.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c
index e43f336..d6ec4c5 100644
--- a/src/mesa/main/texgetimage.c
+++ b/src/mesa/main/texgetimage.c
@@ -1969,7 +1969,7 @@ _mesa_GetCompressedTextureImage(GLuint texture, GLint 
level,
 }
 
 
-void APIENTRY
+void GLAPIENTRY
 _mesa_GetCompressedTextureSubImage(GLuint texture, GLint level,
GLint xoffset, GLint yoffset,
GLint zoffset, GLsizei width,
-- 
1.8.5.6

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

[Mesa-dev] [Bug 111269] GFX10: "Random" GPU hangs with Rise Of The Tomb Raider

2019-11-11 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=111269

lptech1...@gmail.com changed:

   What|Removed |Added

 CC||lptech1...@gmail.com

-- 
You are receiving this mail because:
You are the assignee for the bug.___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH] spirv: s/{}/{0}/ initializer to fix MSVC build

2019-11-11 Thread Brian Paul
Trivial.
---
 src/compiler/spirv/vtn_variables.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/compiler/spirv/vtn_variables.c 
b/src/compiler/spirv/vtn_variables.c
index 944d1f0..37ad4f2 100644
--- a/src/compiler/spirv/vtn_variables.c
+++ b/src/compiler/spirv/vtn_variables.c
@@ -50,7 +50,7 @@ static struct vtn_pointer*
 vtn_decorate_pointer(struct vtn_builder *b, struct vtn_value *val,
  struct vtn_pointer *ptr)
 {
-   struct vtn_pointer dummy = { };
+   struct vtn_pointer dummy = {0};
vtn_foreach_decoration(b, val, ptr_decoration_cb, &dummy);
 
/* If we're adding access flags, make a copy of the pointer.  We could
-- 
1.8.5.6

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