[Mesa-dev] [PATCH 2/2] drisw: Use separate drisw_loader_funcs for shm

Michal Srb msrb at suse.com
Fri Nov 23 15:57:43 UTC 2018


On pátek 23. listopadu 2018 16:41:33 CET Emil Velikov wrote:
> Hi Michal,
> 
> On 2018/11/23, Michal Srb wrote:
> > The original code was modifying the global drisw_lf variable, which is bad
> > when there are multiple contexts in single process, each initialized with
> > different loader. One may support put_image_shm and the other not.
> > 
> > Since there are currently only two possible combinations, lets create two
> > global tables, one for each. Lets make them const, since we won't change
> > them and they can be shared.
> 
> When possible, please mention the commit which "breaks" things, like
> below. It helps highlight exactly where a backport/cherry-pick is
> applicable.
> 
> Fixes: 63c427fa71a ("drisw: use putImageShm if available")
> 
> > Signed-off-by: Michal Srb <msrb at suse.com>
> > ---
> > This fixes crash in VLC. It used two GL contexts (each in different
> > thread), one was initialized by its Qt GUI, the other by its video output
> > plugin. The first one set the put_image_shm=drisw_put_image_shm, the
> > second did not, but since the same structure was used, the
> > drisw_put_image_shm was used too. Then it crashed because the second
> > loader did not have putImageShm set.
> > 
> > Downstream bug:
> > https://bugzilla.opensuse.org/show_bug.cgi?id=1113533
> 
> Personally, I'd keep the extra note about VLC and downstream bug in the
> commit message. Although if you prefer let's keep it as-is.
> 
> For the series:
> Reviewed-by: Emil Velikov <emil.velikov at collabora.com>
> 
> I'll push this early/mid next weeks, unless someone beats me to it.

Thank you for the review. I'll send v2 with the Fixes and the note moved to 
the commit message.

Br,
Michal




More information about the mesa-dev mailing list