diff options
author | Carlo Landmeter <clandmeter@gmail.com> | 2010-09-27 15:28:03 +0000 |
---|---|---|
committer | Carlo Landmeter <clandmeter@gmail.com> | 2010-09-28 12:16:31 +0000 |
commit | 623eff34fb443444fbdc4db46eda52d3f8e02963 (patch) | |
tree | 3f29519ed6af7ad73ae5f547cc205ab2a5591e3e /main/mesa/fix-glx1.3-crash-xorg19.patch | |
parent | f937d6b596f6f1f5c8ab9e95d14420b7c9aad5b3 (diff) | |
download | aports-623eff34fb443444fbdc4db46eda52d3f8e02963.tar.bz2 aports-623eff34fb443444fbdc4db46eda52d3f8e02963.tar.xz |
main/mesa: upgrade to 7.8.2
Diffstat (limited to 'main/mesa/fix-glx1.3-crash-xorg19.patch')
-rw-r--r-- | main/mesa/fix-glx1.3-crash-xorg19.patch | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/main/mesa/fix-glx1.3-crash-xorg19.patch b/main/mesa/fix-glx1.3-crash-xorg19.patch new file mode 100644 index 0000000000..bd09b9e71a --- /dev/null +++ b/main/mesa/fix-glx1.3-crash-xorg19.patch @@ -0,0 +1,73 @@ +From 8f13c69e7658df3a97e388f210dae175639d6d8d Mon Sep 17 00:00:00 2001 +From: Chris Wilson <chris@chris-wilson.co.uk> +Date: Fri, 16 Jul 2010 12:24:53 +0100 +Subject: [PATCH] intel: Fix invalidate before initialisation + +Fixes: + + Bug 29091 - 1.9RC5 server crash when starting GLX 1.3 app with mesa 7.8 + Intel dri2 driver. + https://bugs.freedesktop.org/show_bug.cgi?id=29091 + +Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> +--- + src/mesa/drivers/dri/common/dri_util.c | 2 +- + src/mesa/drivers/dri/intel/intel_screen.c | 19 +++++++++++++++---- + 2 files changed, 16 insertions(+), 5 deletions(-) + +diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c +index 75c9882..9a9bfed 100644 +--- a/src/mesa/drivers/dri/common/dri_util.c ++++ b/src/mesa/drivers/dri/common/dri_util.c +@@ -432,7 +432,7 @@ driCreateNewDrawable(__DRIscreen *psp, const __DRIconfig *config, + */ + (void) attrs; + +- pdp = malloc(sizeof *pdp); ++ pdp = calloc(1, sizeof *pdp); + if (!pdp) { + return NULL; + } +diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c +index 6e4bb64..083b7bb 100644 +--- a/src/mesa/drivers/dri/intel/intel_screen.c ++++ b/src/mesa/drivers/dri/intel/intel_screen.c +@@ -102,10 +102,21 @@ static const __DRItexBufferExtension intelTexBufferExtension = { + intelSetTexBuffer2, + }; + ++static inline struct intel_context * ++to_intel_context(__DRIdrawable *drawable) ++{ ++ if (drawable->driContextPriv == NULL) ++ return NULL; ++ ++ return drawable->driContextPriv->driverPrivate; ++} ++ + static void + intelDRI2Flush(__DRIdrawable *drawable) + { +- struct intel_context *intel = drawable->driContextPriv->driverPrivate; ++ struct intel_context *intel = to_intel_context(drawable); ++ if (!intel) ++ return; + + if (intel->gen < 4) + INTEL_FIREVERTICES(intel); +@@ -117,9 +128,9 @@ intelDRI2Flush(__DRIdrawable *drawable) + static void + intelDRI2Invalidate(__DRIdrawable *drawable) + { +- struct intel_context *intel = drawable->driContextPriv->driverPrivate; +- +- intel->using_dri2_swapbuffers = GL_TRUE; ++ struct intel_context *intel = to_intel_context(drawable); ++ if (intel) ++ intel->using_dri2_swapbuffers = GL_TRUE; + dri2InvalidateDrawable(drawable); + } + +-- +1.7.1 + |