diff --git a/Mesa.changes b/Mesa.changes index 03f0690..47c82af 100644 --- a/Mesa.changes +++ b/Mesa.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Jan 20 16:40:10 UTC 2016 - eich@suse.com + +- u_dri2-Check-for-dummyContext-to-see-if-the-glx_context-is-valid.patch + Check for dummyContext to see if the glx_context is valid (boo#962609). + ------------------------------------------------------------------- Wed Jan 20 15:16:11 UTC 2016 - sndirsch@suse.com diff --git a/Mesa.spec b/Mesa.spec index 883c3c1..7824792 100644 --- a/Mesa.spec +++ b/Mesa.spec @@ -57,6 +57,7 @@ Source6: %{name}-rpmlintrc Source7: Mesa.keyring # required for building against wayland of openSUSE 13.1 Patch0: n_Fixed-build-against-wayland-1.2.1.patch +Patch1: u_dri2-Check-for-dummyContext-to-see-if-the-glx_context-is-valid.patch # to be upstreamed Patch11: u_Fix-crash-in-swrast-when-setting-a-texture-for-a-pix.patch # Patch from Fedora, fix 16bpp in llvmpipe @@ -550,6 +551,7 @@ rm -rf docs/README.{VMS,WIN32,OS2} # required for building against wayland of openSUSE 13.1 %patch0 -p1 %endif +%patch1 -p1 ### disabled, but not dropped yet; these still need investigation in ### order to figure out whether the issue is still reproducable and ### hence a fix is required diff --git a/u_dri2-Check-for-dummyContext-to-see-if-the-glx_context-is-valid.patch b/u_dri2-Check-for-dummyContext-to-see-if-the-glx_context-is-valid.patch new file mode 100644 index 0000000..e938294 --- /dev/null +++ b/u_dri2-Check-for-dummyContext-to-see-if-the-glx_context-is-valid.patch @@ -0,0 +1,30 @@ +From: Egbert Eich +Date: Wed Jan 20 13:51:11 2016 +0100 +Subject: [PATCH]dri2: Check for dummyContext to see if the glx_context is valid +Patch-mainline: to be upstreamed + +References: boo#962609 +Signed-off-by: Egbert Eich + +According to the comments in src/glx/glxcurrent.c __glXGetCurrentContext() +always returns a valid pointer. If no context is made current, it will +contain dummyContext. Thus a test for NULL will always fail. + +Signed-off-by: Egbert Eich +--- + src/glx/dri2_glx.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c +index 27ea952..6a5f964 100644 +--- a/src/glx/dri2_glx.c ++++ b/src/glx/dri2_glx.c +@@ -520,7 +520,7 @@ dri2GetCurrentContext() + struct glx_context *gc = __glXGetCurrentContext(); + struct dri2_context *dri2Ctx = (struct dri2_context *)gc; + +- return dri2Ctx ? dri2Ctx->driContext : NULL; ++ return (gc != &dummyContext) ? dri2Ctx->driContext : NULL; + } + + /**