summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--debian/changelog1
-rw-r--r--debian/patches/08_r300_update_window_state_when_bound_but_stamp_changed.patch35
-rw-r--r--debian/patches/series1
3 files changed, 37 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index a1a5747de5c..86f90032852 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ mesa (6.5.2-5) UNRELEASED; urgency=low
* Add 07_call_radeonSetCliprects_from_radeonMakeCurrent.patch
(closes: #420164). Thanks to Christian Ohm.
+ * Add 08_r300_update_window_state_when_bound_but_stamp_changed.patch
-- Brice Goglin <[email protected]> Fri, 20 Apr 2007 18:36:51 +0200
diff --git a/debian/patches/08_r300_update_window_state_when_bound_but_stamp_changed.patch b/debian/patches/08_r300_update_window_state_when_bound_but_stamp_changed.patch
new file mode 100644
index 00000000000..8bf8db683f6
--- /dev/null
+++ b/debian/patches/08_r300_update_window_state_when_bound_but_stamp_changed.patch
@@ -0,0 +1,35 @@
+From: Michel Dänzer <[email protected]>
+Date: Fri, 9 Mar 2007 08:43:17 +0000 (+0100)
+Subject: r300: Also update window state when it's already bound but its stamp changed.
+X-Git-Url: http://gitweb.freedesktop.org/?p=mesa/mesa.git;a=commitdiff;h=4d9901a1cab8e0d55b1b2309cf3ffec235e53149
+
+r300: Also update window state when it's already bound but its stamp changed.
+
+And set new cliprects before deriving other state from them. This ensures
+cliprects aren't accessed after having been freed.
+
+Thanks to Panagiotis Papadakos for testing various iterations of this.
+---
+
+--- a/src/mesa/drivers/dri/r300/radeon_context.c
++++ b/src/mesa/drivers/dri/r300/radeon_context.c
+@@ -273,15 +273,15 @@ GLboolean radeonMakeCurrent(__DRIcontext
+ &radeon->vbl_seq);
+ }
+
++ radeon->dri.readable = driReadPriv;
++
+ if (radeon->dri.drawable != driDrawPriv ||
+- radeon->dri.readable != driReadPriv) {
++ radeon->lastStamp != driDrawPriv->lastStamp) {
+ radeon->dri.drawable = driDrawPriv;
+- radeon->dri.readable = driReadPriv;
+
++ radeonSetCliprects(radeon);
+ r300UpdateWindow(radeon->glCtx);
+ r300UpdateViewportOffset(radeon->glCtx);
+-
+- radeonSetCliprects(radeon);
+ }
+
+ _mesa_make_current(radeon->glCtx,
diff --git a/debian/patches/series b/debian/patches/series
index 6bb18942ac9..56f3fe8fa06 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -6,3 +6,4 @@
05_static-nonpic.patch
06_fix_texture_data_corruption.patch
07_call_radeonSetCliprects_from_radeonMakeCurrent.patch
+08_r300_update_window_state_when_bound_but_stamp_changed.patch