[Mesa-dev] Mesa drivers/GLX and fork

Ian Romanick idr at freedesktop.org
Tue Oct 15 19:46:11 CEST 2013


On 10/15/2013 03:45 AM, Christian König wrote:
> Hi Marek,
> 
> for the past few days I've been working on solving
> https://bugs.freedesktop.org/show_bug.cgi?id=70123.
> 
> The basic problem is that compton forks itself into the background after
> initializing the X server connection and GLX context. What happens now
> is that only comptons main thread get's cloned by the fork, but not any
> background thread created by the radeon winsys to offload the command
> submission (that is common and very well known pthread behaviour).
> 
> I'm not 100% sure if comptons behaviour is valid or not and so if we
> should try to fix it or not. On the one hand it should be transparent to
> the application that we created another thread to offload some work from
> the main thread, but on on the other hand dublicating the X connection
> and GLX context with fork just screams for problems.
> 
> Any idea what the spec(s) say about this?

At the very least, if the context is current before the fork, it can't
be current in the new process after the fork.

Is it a direct rendering context or indirect rendering?  Direct
rendering contexts can't even be in share groups across address space
boundaries.

It doesn't seem like it can ever work.

> Thanks,
> Christian.
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev



More information about the mesa-dev mailing list