summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r300/radeon_lock.c
diff options
context:
space:
mode:
authorOliver McFadden <z3ro.geek@gmail.com>2007-05-11 22:21:19 +0000
committerOliver McFadden <z3ro.geek@gmail.com>2007-05-11 22:21:19 +0000
commit5a09ea01e06a648b37eb167914fb1549e066326d (patch)
tree4a03bb9d7d5c967cc775396c0d43db5b3bceabcc /src/mesa/drivers/dri/r300/radeon_lock.c
parent98d25a5a28b1d6e4ed299904aec4104f7d6c80b0 (diff)
r300: Reduced the diff on radeon_lock.[ch].
Diffstat (limited to 'src/mesa/drivers/dri/r300/radeon_lock.c')
-rw-r--r--src/mesa/drivers/dri/r300/radeon_lock.c49
1 files changed, 17 insertions, 32 deletions
diff --git a/src/mesa/drivers/dri/r300/radeon_lock.c b/src/mesa/drivers/dri/r300/radeon_lock.c
index 978d2fae0c..bc3c2d6c6b 100644
--- a/src/mesa/drivers/dri/r300/radeon_lock.c
+++ b/src/mesa/drivers/dri/r300/radeon_lock.c
@@ -84,36 +84,6 @@ void radeonUpdatePageFlipping(radeonContextPtr rmesa)
}
}
-/**
- * Called by radeonGetLock() after the lock has been obtained.
- */
-static void r300RegainedLock(radeonContextPtr rmesa)
-{
- int i;
- __DRIdrawablePrivate *const drawable = rmesa->dri.drawable;
- r300ContextPtr r300 = (r300ContextPtr) rmesa;
- drm_radeon_sarea_t *sarea = rmesa->sarea;
-
- if (rmesa->lastStamp != drawable->lastStamp) {
- radeonUpdatePageFlipping(rmesa);
- radeonSetCliprects(rmesa);
-#if 1
- r300UpdateViewportOffset(rmesa->glCtx);
- driUpdateFramebufferSize(rmesa->glCtx, drawable);
-#else
- radeonUpdateScissor(rmesa->glCtx);
-#endif
- }
-
- if (sarea->ctx_owner != rmesa->dri.hwContext) {
- sarea->ctx_owner = rmesa->dri.hwContext;
-
- for (i = 0; i < r300->nr_heaps; i++) {
- DRI_AGE_TEXTURES(r300->texture_heaps[i]);
- }
- }
-}
-
/* Update the hardware state. This is called if another context has
* grabbed the hardware lock, which includes the X server. This
* function also updates the driver's window state after the X server
@@ -127,6 +97,8 @@ void radeonGetLock(radeonContextPtr rmesa, GLuint flags)
__DRIdrawablePrivate *const drawable = rmesa->dri.drawable;
__DRIdrawablePrivate *const readable = rmesa->dri.readable;
__DRIscreenPrivate *sPriv = rmesa->dri.screen;
+ drm_radeon_sarea_t *sarea = rmesa->sarea;
+ r300ContextPtr r300 = (r300ContextPtr) rmesa;
assert(drawable != NULL);
@@ -145,8 +117,21 @@ void radeonGetLock(radeonContextPtr rmesa, GLuint flags)
DRI_VALIDATE_DRAWABLE_INFO(sPriv, readable);
}
- if (IS_R300_CLASS(rmesa->radeonScreen))
- r300RegainedLock(rmesa);
+ if (rmesa->lastStamp != drawable->lastStamp) {
+ radeonUpdatePageFlipping(rmesa);
+ radeonSetCliprects(rmesa);
+ r300UpdateViewportOffset(rmesa->glCtx);
+ driUpdateFramebufferSize(rmesa->glCtx, drawable);
+ }
+
+ if (sarea->ctx_owner != rmesa->dri.hwContext) {
+ int i;
+
+ sarea->ctx_owner = rmesa->dri.hwContext;
+ for (i = 0; i < r300->nr_heaps; i++) {
+ DRI_AGE_TEXTURES(r300->texture_heaps[i]);
+ }
+ }
rmesa->lost_context = GL_TRUE;
}