summaryrefslogtreecommitdiff
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorMichel Dänzer <michel@tungstengraphics.com>2007-03-09 09:43:17 +0100
committerMichel Dänzer <michel@tungstengraphics.com>2007-03-09 09:43:17 +0100
commit4d9901a1cab8e0d55b1b2309cf3ffec235e53149 (patch)
tree6df8d8669b38a619d3ac02b10891c67a68f8ef64 /src/mesa/drivers
parentd85667950f6797f63fa0863e6882390c2adaaf2b (diff)
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.
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/r300/radeon_context.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/r300/radeon_context.c b/src/mesa/drivers/dri/r300/radeon_context.c
index d66f1dc49e..66d1b153b3 100644
--- a/src/mesa/drivers/dri/r300/radeon_context.c
+++ b/src/mesa/drivers/dri/r300/radeon_context.c
@@ -273,15 +273,15 @@ GLboolean radeonMakeCurrent(__DRIcontextPrivate * driContextPriv,
&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,