From b2594f23bf804f8aa3548ab009c10867357d4c15e491ddc8207407156fb08e1b Mon Sep 17 00:00:00 2001 From: Stefan Dirsch Date: Thu, 15 Nov 2018 13:19:54 +0000 Subject: [PATCH] Accepting request 649270 from home:michalsrb:bug1113533:X11:XOrg - n_drisw-Do-not-use-drisw_put_image_shm.patch * Workaround for applications that create GL context twice with different loaders. (boo#1113533) OBS-URL: https://build.opensuse.org/request/show/649270 OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/Mesa?expand=0&rev=779 --- Mesa.changes | 7 ++++ Mesa.spec | 2 + n_drisw-Do-not-use-drisw_put_image_shm.patch | 44 ++++++++++++++++++++ 3 files changed, 53 insertions(+) create mode 100644 n_drisw-Do-not-use-drisw_put_image_shm.patch diff --git a/Mesa.changes b/Mesa.changes index 28a235f..81d60a6 100644 --- a/Mesa.changes +++ b/Mesa.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Nov 13 08:50:56 UTC 2018 - msrb@suse.com + +- n_drisw-Do-not-use-drisw_put_image_shm.patch + * Workaround for applications that create GL context twice with + different loaders. (boo#1113533) + ------------------------------------------------------------------- Thu Nov 1 13:15:49 UTC 2018 - sndirsch@suse.com diff --git a/Mesa.spec b/Mesa.spec index 0a09ccb..25242fe 100644 --- a/Mesa.spec +++ b/Mesa.spec @@ -141,6 +141,7 @@ Patch51: U_intel-aubinator-mark-ftruncate_res-as-MAYBE_UNUSED-i.patch Patch52: U_python-Fix-rich-comparisons.patch Patch53: U_python-Use-key-functions-when-sorting-containers.patch Patch54: n_drirc-disable-rgb10-for-chromium-on-amd.patch +Patch55: n_drisw-Do-not-use-drisw_put_image_shm.patch BuildRequires: autoconf >= 2.60 BuildRequires: automake @@ -732,6 +733,7 @@ rm -rf docs/README.{VMS,WIN32,OS2} %patch52 -p1 %patch53 -p1 %patch54 -p1 +%patch55 -p1 # Remove requires to libglvnd/libglvnd-devel from baselibs.conf when # disabling libglvnd build; ugly ... diff --git a/n_drisw-Do-not-use-drisw_put_image_shm.patch b/n_drisw-Do-not-use-drisw_put_image_shm.patch new file mode 100644 index 0000000..eed3f53 --- /dev/null +++ b/n_drisw-Do-not-use-drisw_put_image_shm.patch @@ -0,0 +1,44 @@ +From 44e72286f76d244f6f2acf2cbf7204b6d7377be8 Mon Sep 17 00:00:00 2001 +From: Michal Srb +Date: Tue, 13 Nov 2018 09:31:53 +0100 +Subject: [PATCH] drisw: Do not use drisw_put_image_shm + +The put_image_shm is temporarily disabled to workaround crashes in +applications that create two software-rendering OpenGL contexts, each +time using different version of loader. This caused crashes because the +drisw_lf variable is shared between them. + +https://bugzilla.opensuse.org/show_bug.cgi?id=1113533 +--- + src/gallium/state_trackers/dri/drisw.c | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/src/gallium/state_trackers/dri/drisw.c b/src/gallium/state_trackers/dri/drisw.c +index 886f94dc02..62ced60e92 100644 +--- a/src/gallium/state_trackers/dri/drisw.c ++++ b/src/gallium/state_trackers/dri/drisw.c +@@ -446,10 +446,21 @@ drisw_init_screen(__DRIscreen * sPriv) + + sPriv->driverPrivate = (void *)screen; + sPriv->extensions = drisw_screen_extensions; ++ ++ /* The put_image_shm is temporarily disabled to workaround crashes in ++ * applications that create two software-rendering OpenGL contexts, each ++ * time using different version of loader. This caused crashes because the ++ * drisw_lf variable is shared between them. ++ * ++ * https://bugzilla.opensuse.org/show_bug.cgi?id=1113533 ++ * ++ */ ++#if 0 + if (loader->base.version >= 4) { + if (loader->putImageShm) + drisw_lf.put_image_shm = drisw_put_image_shm; + } ++#endif + + if (pipe_loader_sw_probe_dri(&screen->dev, &drisw_lf)) { + dri_init_options(screen); +-- +2.16.4 +