• Michal Srb's avatar
    drisw: Use separate drisw_loader_funcs for shm · 63c0916a
    Michal Srb authored
    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.
    
    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
    
    v2: Added Fixes and described the VLC bug.
    
    Fixes: 63c427fa ("drisw: use putImageShm if available")
    Signed-off-by: 's avatarMichal Srb <msrb@suse.com>
    Reviewed-by: 's avatarEmil Velikov <emil.velikov@collabora.com>
    63c0916a
Name
Last commit
Last update
bin Loading commit data...
build-support Loading commit data...
docs Loading commit data...
doxygen Loading commit data...
include Loading commit data...
m4 Loading commit data...
scons Loading commit data...
scripts Loading commit data...
src Loading commit data...
.dir-locals.el Loading commit data...
.editorconfig Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
.travis.yml Loading commit data...
Android.common.mk Loading commit data...
Android.mk Loading commit data...
CleanSpec.mk Loading commit data...
Makefile.am Loading commit data...
README.rst Loading commit data...
REVIEWERS Loading commit data...
SConstruct Loading commit data...
VERSION Loading commit data...
appveyor.yml Loading commit data...
autogen.sh Loading commit data...
common.py Loading commit data...
configure.ac Loading commit data...
install-gallium-links.mk Loading commit data...
install-lib-links.mk Loading commit data...
meson.build Loading commit data...
meson_options.txt Loading commit data...