diff options
author | Reinhard Tartler <siretart@tauware.de> | 2011-10-10 17:43:39 +0200 |
---|---|---|
committer | Reinhard Tartler <siretart@tauware.de> | 2011-10-10 17:43:39 +0200 |
commit | f4092abdf94af6a99aff944d6264bc1284e8bdd4 (patch) | |
tree | 2ac1c9cc16ceb93edb2c4382c088dac5aeafdf0f /nx-X11/extras/Mesa/src/mesa/drivers/dri/s3v/s3v_lock.c | |
parent | a840692edc9c6d19cd7c057f68e39c7d95eb767d (diff) | |
download | nx-libs-f4092abdf94af6a99aff944d6264bc1284e8bdd4.tar.gz nx-libs-f4092abdf94af6a99aff944d6264bc1284e8bdd4.tar.bz2 nx-libs-f4092abdf94af6a99aff944d6264bc1284e8bdd4.zip |
Imported nx-X11-3.1.0-1.tar.gznx-X11/3.1.0-1
Summary: Imported nx-X11-3.1.0-1.tar.gz
Keywords:
Imported nx-X11-3.1.0-1.tar.gz
into Git repository
Diffstat (limited to 'nx-X11/extras/Mesa/src/mesa/drivers/dri/s3v/s3v_lock.c')
-rw-r--r-- | nx-X11/extras/Mesa/src/mesa/drivers/dri/s3v/s3v_lock.c | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/nx-X11/extras/Mesa/src/mesa/drivers/dri/s3v/s3v_lock.c b/nx-X11/extras/Mesa/src/mesa/drivers/dri/s3v/s3v_lock.c new file mode 100644 index 000000000..52bb87ece --- /dev/null +++ b/nx-X11/extras/Mesa/src/mesa/drivers/dri/s3v/s3v_lock.c @@ -0,0 +1,62 @@ +/* + * Author: Max Lingua <sunmax@libero.it> + */ + +#include "s3v_context.h" + +#if DEBUG_LOCKING +char *prevLockFile = NULL; +int prevLockLine = 0; +#endif + + +/* 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 + * moves, resizes or restacks a window -- the change will be reflected + * in the drawable position and clip rects. Since the X server grabs + * the hardware lock when it changes the window state, this routine will + * automatically be called after such a change. + */ +void s3vGetLock( s3vContextPtr vmesa, GLuint flags ) +{ + __DRIdrawablePrivate *dPriv = vmesa->driDrawable; +/* __DRIscreenPrivate *sPriv = vmesa->driScreen; */ + + printf("s3vGetLock <- ***\n"); + + drmGetLock( vmesa->driFd, vmesa->hHWContext, flags ); + + /* The window might have moved, so we might need to get new clip + * rects. + * + * NOTE: This releases and regrabs the hw lock to allow the X server + * to respond to the DRI protocol request for new drawable info. + * Since the hardware state depends on having the latest drawable + * clip rects, all state checking must be done _after_ this call. + */ + /* DRI_VALIDATE_DRAWABLE_INFO( vmesa->display, sPriv, dPriv ); */ + + if ( vmesa->lastStamp != dPriv->lastStamp ) { + vmesa->lastStamp = dPriv->lastStamp; + vmesa->new_state |= S3V_NEW_WINDOW | S3V_NEW_CLIP; + } + + vmesa->numClipRects = dPriv->numClipRects; + vmesa->pClipRects = dPriv->pClipRects; + +#if 0 + vmesa->dirty = ~0; + + if ( sarea->ctxOwner != vmesa->hHWContext ) { + sarea->ctxOwner = vmesa->hHWContext; + vmesa->dirty = S3V_UPLOAD_ALL; + } + + for ( i = 0 ; i < vmesa->lastTexHeap ; i++ ) { + if ( sarea->texAge[i] != vmesa->lastTexAge[i] ) { + s3vAgeTextures( vmesa, i ); + } + } +#endif +} |