diff options
Diffstat (limited to 'src/mesa/drivers/dri/r128')
-rw-r--r-- | src/mesa/drivers/dri/r128/Makefile.solo | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r128/r128_context.h | 6 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r128/r128_ioctl.c | 32 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r128/server/r128_dri.c | 8 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r128/server/r128_sarea.h | 2 |
5 files changed, 24 insertions, 26 deletions
diff --git a/src/mesa/drivers/dri/r128/Makefile.solo b/src/mesa/drivers/dri/r128/Makefile.solo index cb40c7692e7..8017979854f 100644 --- a/src/mesa/drivers/dri/r128/Makefile.solo +++ b/src/mesa/drivers/dri/r128/Makefile.solo @@ -7,7 +7,7 @@ TOP = ../../../../.. default: linux-solo -SHARED_INCLUDES = $(INCLUDE_DIRS) -I. -I../common -Iserver +SHARED_INCLUDES = $(INCLUDE_DIRS) -I. -I../common -Iserver -I../drm/shared MINIGLX_INCLUDES = -I$(TOP)/src/glx/mini DEFINES += \ diff --git a/src/mesa/drivers/dri/r128/r128_context.h b/src/mesa/drivers/dri/r128/r128_context.h index fba6077b29e..0a8735fd08c 100644 --- a/src/mesa/drivers/dri/r128/r128_context.h +++ b/src/mesa/drivers/dri/r128/r128_context.h @@ -181,10 +181,10 @@ struct r128_context { GLint readOffset, readPitch; GLuint numClipRects; /* Cliprects for the draw buffer */ - XF86DRIClipRectPtr pClipRects; + drm_clip_rect_t *pClipRects; GLuint scissor; - XF86DRIClipRectRec ScissorRect; /* Current software scissor */ + drm_clip_rect_t ScissorRect; /* Current software scissor */ /* Mirrors of some DRI state */ @@ -195,7 +195,7 @@ struct r128_context { unsigned int lastStamp; /* mirror driDrawable->lastStamp */ drmContext hHWContext; - drmLock *driHwLock; + drm_hw_lock_t *driHwLock; int driFd; r128ScreenPtr r128Screen; /* Screen private DRI data */ diff --git a/src/mesa/drivers/dri/r128/r128_ioctl.c b/src/mesa/drivers/dri/r128/r128_ioctl.c index 6b2785eebe0..e1c959b35f5 100644 --- a/src/mesa/drivers/dri/r128/r128_ioctl.c +++ b/src/mesa/drivers/dri/r128/r128_ioctl.c @@ -106,7 +106,7 @@ drmBufPtr r128GetBufferLocked( r128ContextPtr rmesa ) void r128FlushVerticesLocked( r128ContextPtr rmesa ) { - XF86DRIClipRectPtr pbox = rmesa->pClipRects; + drm_clip_rect_t *pbox = rmesa->pClipRects; int nbox = rmesa->numClipRects; drmBufPtr buffer = rmesa->vert_buf; int count = rmesa->num_verts; @@ -148,7 +148,7 @@ void r128FlushVerticesLocked( r128ContextPtr rmesa ) { for ( i = 0 ; i < nbox ; ) { int nr = MIN2( i + R128_NR_SAREA_CLIPRECTS, nbox ); - XF86DRIClipRectPtr b = rmesa->sarea->boxes; + drm_clip_rect_t *b = rmesa->sarea->boxes; int discard = 0; rmesa->sarea->nbox = nr - i; @@ -291,12 +291,12 @@ void r128CopyBuffer( const __DRIdrawablePrivate *dPriv ) for ( i = 0 ; i < nbox ; ) { GLint nr = MIN2( i + R128_NR_SAREA_CLIPRECTS , nbox ); - XF86DRIClipRectPtr box = dPriv->pClipRects; - XF86DRIClipRectPtr b = rmesa->sarea->boxes; + drm_clip_rect_t *box = dPriv->pClipRects; + drm_clip_rect_t *b = rmesa->sarea->boxes; GLint n = 0; for ( ; i < nr ; i++ ) { - *b++ = *(XF86DRIClipRectRec *)&box[i]; + *b++ = box[i]; n++; } rmesa->sarea->nbox = n; @@ -470,8 +470,8 @@ static void r128Clear( GLcontext *ctx, GLbitfield mask, GLboolean all, for ( i = 0 ; i < rmesa->numClipRects ; ) { GLint nr = MIN2( i + R128_NR_SAREA_CLIPRECTS , rmesa->numClipRects ); - XF86DRIClipRectPtr box = rmesa->pClipRects; - XF86DRIClipRectPtr b = rmesa->sarea->boxes; + drm_clip_rect_t *box = rmesa->pClipRects; + drm_clip_rect_t *b = rmesa->sarea->boxes; GLint n = 0; if ( !all ) { @@ -497,7 +497,7 @@ static void r128Clear( GLcontext *ctx, GLbitfield mask, GLboolean all, } } else { for ( ; i < nr ; i++ ) { - *b++ = *(XF86DRIClipRectPtr)&box[i]; + *b++ = box[i]; n++; } } @@ -548,7 +548,7 @@ void r128WriteDepthSpanLocked( r128ContextPtr rmesa, const GLdepth depth[], const GLubyte mask[] ) { - XF86DRIClipRectPtr pbox = rmesa->pClipRects; + drm_clip_rect_t *pbox = rmesa->pClipRects; drmR128Depth d; int nbox = rmesa->numClipRects; int fd = rmesa->driScreen->fd; @@ -583,7 +583,7 @@ void r128WriteDepthSpanLocked( r128ContextPtr rmesa, { for (i = 0 ; i < nbox ; ) { int nr = MIN2( i + R128_NR_SAREA_CLIPRECTS, nbox ); - XF86DRIClipRectPtr b = rmesa->sarea->boxes; + drm_clip_rect_t *b = rmesa->sarea->boxes; rmesa->sarea->nbox = nr - i; for ( ; i < nr ; i++) { @@ -611,7 +611,7 @@ void r128WriteDepthPixelsLocked( r128ContextPtr rmesa, GLuint n, const GLdepth depth[], const GLubyte mask[] ) { - XF86DRIClipRectPtr pbox = rmesa->pClipRects; + drm_clip_rect_t *pbox = rmesa->pClipRects; drmR128Depth d; int nbox = rmesa->numClipRects; int fd = rmesa->driScreen->fd; @@ -645,7 +645,7 @@ void r128WriteDepthPixelsLocked( r128ContextPtr rmesa, GLuint n, { for (i = 0 ; i < nbox ; ) { int nr = MIN2( i + R128_NR_SAREA_CLIPRECTS, nbox ); - XF86DRIClipRectPtr b = rmesa->sarea->boxes; + drm_clip_rect_t *b = rmesa->sarea->boxes; rmesa->sarea->nbox = nr - i; for ( ; i < nr ; i++) { @@ -671,7 +671,7 @@ void r128WriteDepthPixelsLocked( r128ContextPtr rmesa, GLuint n, void r128ReadDepthSpanLocked( r128ContextPtr rmesa, GLuint n, GLint x, GLint y ) { - XF86DRIClipRectPtr pbox = rmesa->pClipRects; + drm_clip_rect_t *pbox = rmesa->pClipRects; drmR128Depth d; int nbox = rmesa->numClipRects; int fd = rmesa->driScreen->fd; @@ -705,7 +705,7 @@ void r128ReadDepthSpanLocked( r128ContextPtr rmesa, { for (i = 0 ; i < nbox ; ) { int nr = MIN2( i + R128_NR_SAREA_CLIPRECTS, nbox ); - XF86DRIClipRectPtr b = rmesa->sarea->boxes; + drm_clip_rect_t *b = rmesa->sarea->boxes; rmesa->sarea->nbox = nr - i; for ( ; i < nr ; i++) { @@ -731,7 +731,7 @@ void r128ReadDepthSpanLocked( r128ContextPtr rmesa, void r128ReadDepthPixelsLocked( r128ContextPtr rmesa, GLuint n, const GLint x[], const GLint y[] ) { - XF86DRIClipRectPtr pbox = rmesa->pClipRects; + drm_clip_rect_t *pbox = rmesa->pClipRects; drmR128Depth d; int nbox = rmesa->numClipRects; int fd = rmesa->driScreen->fd; @@ -765,7 +765,7 @@ void r128ReadDepthPixelsLocked( r128ContextPtr rmesa, GLuint n, { for (i = 0 ; i < nbox ; ) { int nr = MIN2( i + R128_NR_SAREA_CLIPRECTS, nbox ); - XF86DRIClipRectPtr b = rmesa->sarea->boxes; + drm_clip_rect_t *b = rmesa->sarea->boxes; rmesa->sarea->nbox = nr - i; for ( ; i < nr ; i++) { diff --git a/src/mesa/drivers/dri/r128/server/r128_dri.c b/src/mesa/drivers/dri/r128/server/r128_dri.c index 633c5ad5b3d..8fd6b6e77d1 100644 --- a/src/mesa/drivers/dri/r128/server/r128_dri.c +++ b/src/mesa/drivers/dri/r128/server/r128_dri.c @@ -37,7 +37,6 @@ * */ -#include "sarea.h" #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -49,7 +48,6 @@ #include "driver.h" #include "drm.h" -#include "sarea.h" #include "r128.h" #include "r128_dri.h" #include "r128_macros.h" @@ -465,7 +463,7 @@ static int R128DRIKernelInit(const DRIDriverContext *ctx) memset( &drmInfo, 0, sizeof(drmR128Init) ); drmInfo.func = DRM_R128_INIT_CCE; - drmInfo.sarea_priv_offset = sizeof(XF86DRISAREARec); + drmInfo.sarea_priv_offset = sizeof(drm_sarea_t); drmInfo.is_pci = info->IsPCI; drmInfo.cce_mode = info->CCEMode; drmInfo.cce_secure = info->CCESecure; @@ -888,7 +886,7 @@ static GLboolean R128DRIScreenInit(DRIDriverContext *ctx) R128SAREAPrivPtr pSAREAPriv; pSAREAPriv = (R128SAREAPrivPtr)(((char*)ctx->pSAREA) + - sizeof(XF86DRISAREARec)); + sizeof(drm_sarea_t)); memset(pSAREAPriv, 0, sizeof(*pSAREAPriv)); /* This is the struct passed to radeon_dri.so for its initialization */ @@ -923,7 +921,7 @@ static GLboolean R128DRIScreenInit(DRIDriverContext *ctx) pR128DRI->agpTexMapSize = info->agpTexMapSize; pR128DRI->log2AGPTexGran = info->log2AGPTexGran; pR128DRI->agpTexOffset = info->agpTexStart; - pR128DRI->sarea_priv_offset = sizeof(XF86DRISAREARec); + pR128DRI->sarea_priv_offset = sizeof(drm_sarea_t); return GL_TRUE; } diff --git a/src/mesa/drivers/dri/r128/server/r128_sarea.h b/src/mesa/drivers/dri/r128/server/r128_sarea.h index 8a9f3a41769..d5f431f12e1 100644 --- a/src/mesa/drivers/dri/r128/server/r128_sarea.h +++ b/src/mesa/drivers/dri/r128/server/r128_sarea.h @@ -159,7 +159,7 @@ typedef struct { #if defined(XF86DRI) | defined(_SOLO) /* The current cliprects, or a subset thereof. */ - XF86DRIClipRectRec boxes[R128_NR_SAREA_CLIPRECTS]; + drm_clip_rect_t boxes[R128_NR_SAREA_CLIPRECTS]; unsigned int nbox; #endif |