Re: [Mesa-dev] [PATCH v3 0/4] Disable glthread if libX11 isn't thread-safe

2017-05-09 Thread gregory hainaut
On Tue, 09 May 2017 09:31:18 -0700 Eric Anholt wrote: > Gregory Hainaut writes: > > > On 5/8/17, Emil Velikov wrote: > [...] > > > > Hello Emil, > > > > Yes you're right. And potentially it can be back-ported to stable

Re: [Mesa-dev] [PATCH v3 0/4] Disable glthread if libX11 isn't thread-safe

2017-05-09 Thread Eric Anholt
Gregory Hainaut writes: > On 5/8/17, Emil Velikov wrote: >> Having a look at Xlib might be good indeed. >> >> Then again, the solution you've proposed looks perfectly reasonable, >> IMHO. It handles the problem _now_ and should also work

Re: [Mesa-dev] [PATCH v3 0/4] Disable glthread if libX11 isn't thread-safe

2017-05-09 Thread Gregory Hainaut
On 5/8/17, Emil Velikov wrote: > Having a look at Xlib might be good indeed. > > Then again, the solution you've proposed looks perfectly reasonable, > IMHO. It handles the problem _now_ and should also work when/if we > address Xlib. > I'll take another look

Re: [Mesa-dev] [PATCH v3 0/4] Disable glthread if libX11 isn't thread-safe

2017-05-08 Thread Eric Anholt
gregory hainaut writes: > On Fri, 5 May 2017 17:45:01 +0200 > Axel Davy wrote: > >> Hi, >> >> There should be very few X11 calls while rendering (basically only at >> the beginning or end of a frame). >> >> Why not just always run these

Re: [Mesa-dev] [PATCH v3 0/4] Disable glthread if libX11 isn't thread-safe

2017-05-08 Thread Emil Velikov
On 5 May 2017 at 18:28, gregory hainaut wrote: > On Fri, 5 May 2017 18:17:22 +0100 > Emil Velikov wrote: > >> On 5 May 2017 at 17:58, gregory hainaut wrote: >> > On Fri, 5 May 2017 17:45:01 +0200 >> > Axel Davy

Re: [Mesa-dev] [PATCH v3 0/4] Disable glthread if libX11 isn't thread-safe

2017-05-07 Thread Axel Davy
Hi, There should be very few X11 calls while rendering (basically only at the beginning or end of a frame). Why not just always run these calls in the main thread (and wait for glthread work to finish) ? That's basically what we do for gallium nine. Yours, Axel On 05/05/2017 17:37,

Re: [Mesa-dev] [PATCH v3 0/4] Disable glthread if libX11 isn't thread-safe

2017-05-05 Thread gregory hainaut
On Fri, 5 May 2017 18:17:22 +0100 Emil Velikov wrote: > On 5 May 2017 at 17:58, gregory hainaut wrote: > > On Fri, 5 May 2017 17:45:01 +0200 > > Axel Davy wrote: > > > [...] > > > > Hello Axel, > > > > Yes it

Re: [Mesa-dev] [PATCH v3 0/4] Disable glthread if libX11 isn't thread-safe

2017-05-05 Thread Emil Velikov
On 5 May 2017 at 17:58, gregory hainaut wrote: > On Fri, 5 May 2017 17:45:01 +0200 > Axel Davy wrote: > >> Hi, >> >> There should be very few X11 calls while rendering (basically only at >> the beginning or end of a frame). >> >> Why not just

Re: [Mesa-dev] [PATCH v3 0/4] Disable glthread if libX11 isn't thread-safe

2017-05-05 Thread gregory hainaut
On Fri, 5 May 2017 17:45:01 +0200 Axel Davy wrote: > Hi, > > There should be very few X11 calls while rendering (basically only at > the beginning or end of a frame). > > Why not just always run these calls in the main thread (and wait for > glthread work to finish)

[Mesa-dev] [PATCH v3 0/4] Disable glthread if libX11 isn't thread-safe

2017-05-05 Thread Gregory Hainaut
Hello Mesa developers, Following the discussion from https://lists.freedesktop.org/archives/mesa-dev/2017-April/153137.html A check was added to ensure that X11 display can be locked. It should be enough to ensure thread safety between X11 and glthread. I also did the check on DRI3 as I'm not