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.
This commit is contained in:
@@ -273,15 +273,15 @@ GLboolean radeonMakeCurrent(__DRIcontextPrivate * driContextPriv,
|
||||
&radeon->vbl_seq);
|
||||
}
|
||||
|
||||
if (radeon->dri.drawable != driDrawPriv ||
|
||||
radeon->dri.readable != driReadPriv) {
|
||||
radeon->dri.drawable = driDrawPriv;
|
||||
radeon->dri.readable = driReadPriv;
|
||||
radeon->dri.readable = driReadPriv;
|
||||
|
||||
r300UpdateWindow(radeon->glCtx);
|
||||
r300UpdateViewportOffset(radeon->glCtx);
|
||||
if (radeon->dri.drawable != driDrawPriv ||
|
||||
radeon->lastStamp != driDrawPriv->lastStamp) {
|
||||
radeon->dri.drawable = driDrawPriv;
|
||||
|
||||
radeonSetCliprects(radeon);
|
||||
r300UpdateWindow(radeon->glCtx);
|
||||
r300UpdateViewportOffset(radeon->glCtx);
|
||||
}
|
||||
|
||||
_mesa_make_current(radeon->glCtx,
|
||||
|
||||
Reference in New Issue
Block a user