summaryrefslogtreecommitdiff
path: root/debian/patches/08_r300_update_window_state_when_bound_but_stamp_changed.patch
diff options
context:
space:
mode:
authorBrice Goglin <Brice.Goglin@ens-lyon.org>2007-04-20 18:53:47 +0200
committerBrice Goglin <Brice.Goglin@ens-lyon.org>2007-04-20 18:53:47 +0200
commit0d830a616cb7e71504d97f4b1c130622e10286e5 (patch)
treeded67cb7f00d4456a5be3c6081d424124b385e2b /debian/patches/08_r300_update_window_state_when_bound_but_stamp_changed.patch
parente219bf8338ae31ddc4f5f02e088237d6cd5555a9 (diff)
Add 08_r300_update_window_state_when_bound_but_stamp_changed.patch
Diffstat (limited to 'debian/patches/08_r300_update_window_state_when_bound_but_stamp_changed.patch')
-rw-r--r--debian/patches/08_r300_update_window_state_when_bound_but_stamp_changed.patch35
1 files changed, 35 insertions, 0 deletions
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 <michel@tungstengraphics.com>
+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,