From f405fbb36de167eb3294358d97e6f62a420f3bff Mon Sep 17 00:00:00 2001 From: Oliver McFadden Date: Fri, 11 May 2007 22:23:31 +0000 Subject: [PATCH] r300: Corrected some macro errors from the previous commit. --- src/mesa/drivers/dri/r300/radeon_lock.h | 22 +++++++++++----------- src/mesa/drivers/dri/radeon/radeon_lock.h | 12 ++++++------ 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/mesa/drivers/dri/r300/radeon_lock.h b/src/mesa/drivers/dri/r300/radeon_lock.h index e131967e423..3c1c8c2a0de 100644 --- a/src/mesa/drivers/dri/r300/radeon_lock.h +++ b/src/mesa/drivers/dri/r300/radeon_lock.h @@ -100,22 +100,22 @@ extern int prevLockLine; do { \ char __ret = 0; \ DEBUG_CHECK_LOCK(); \ - DRM_CAS(rmesa->dri.hwLock, rmesa->dri.hwContext, \ - (DRM_LOCK_HELD | rmesa->dri.hwContext), __ret); \ + DRM_CAS((rmesa)->dri.hwLock, (rmesa)->dri.hwContext, \ + (DRM_LOCK_HELD | (rmesa)->dri.hwContext), __ret); \ if (__ret) \ - radeonGetLock(rmesa, 0); \ + radeonGetLock((rmesa), 0); \ DEBUG_LOCK(); \ } while (0) #if R200_MERGED #define UNLOCK_HARDWARE( rmesa ) \ do { \ - DRM_UNLOCK(rmesa->dri.fd, \ - rmesa->dri.hwLock, \ - rmesa->dri.hwContext); \ + DRM_UNLOCK((rmesa)->dri.fd, \ + (rmesa)->dri.hwLock, \ + (rmesa)->dri.hwContext); \ DEBUG_RESET(); \ - if (IS_R200_CLASS(rmesa->radeonScreen)) { \ - r200ContextPtr __r200 = (r200ContextPtr)rmesa; \ + if (IS_R200_CLASS((rmesa)->radeonScreen)) { \ + r200ContextPtr __r200 = (r200ContextPtr)(rmesa); \ if (__r200->save_on_next_unlock) \ r200SaveHwState(__r200); \ __r200->save_on_next_unlock = GL_FALSE; \ @@ -124,9 +124,9 @@ extern int prevLockLine; #else #define UNLOCK_HARDWARErmesa \ do { \ - DRM_UNLOCK(rmesa->dri.fd, \ - rmesa->dri.hwLock, \ - rmesa->dri.hwContext); \ + DRM_UNLOCK((rmesa)->dri.fd, \ + (rmesa)->dri.hwLock, \ + (rmesa)->dri.hwContext); \ DEBUG_RESET(); \ } while (0) #endif diff --git a/src/mesa/drivers/dri/radeon/radeon_lock.h b/src/mesa/drivers/dri/radeon/radeon_lock.h index e793541e3f0..86e96aa7d2c 100644 --- a/src/mesa/drivers/dri/radeon/radeon_lock.h +++ b/src/mesa/drivers/dri/radeon/radeon_lock.h @@ -94,18 +94,18 @@ extern int prevLockLine; do { \ char __ret = 0; \ DEBUG_CHECK_LOCK(); \ - DRM_CAS( rmesa->dri.hwLock, rmesa->dri.hwContext, \ - (DRM_LOCK_HELD | rmesa->dri.hwContext), __ret ); \ + DRM_CAS( (rmesa)->dri.hwLock, (rmesa)->dri.hwContext, \ + (DRM_LOCK_HELD | (rmesa)->dri.hwContext), __ret ); \ if ( __ret ) \ - radeonGetLock( rmesa, 0 ); \ + radeonGetLock( (rmesa), 0 ); \ DEBUG_LOCK(); \ } while (0) #define UNLOCK_HARDWARE( rmesa ) \ do { \ - DRM_UNLOCK( rmesa->dri.fd, \ - rmesa->dri.hwLock, \ - rmesa->dri.hwContext ); \ + DRM_UNLOCK( (rmesa)->dri.fd, \ + (rmesa)->dri.hwLock, \ + (rmesa)->dri.hwContext ); \ DEBUG_RESET(); \ } while (0) -- 2.30.2