diff options
author | Jon Smirl <[email protected]> | 2004-03-11 20:35:38 +0000 |
---|---|---|
committer | Jon Smirl <[email protected]> | 2004-03-11 20:35:38 +0000 |
commit | ae4a1cc0666860bf5cc37a5cb549afc9aa5448b0 (patch) | |
tree | 495f1f0249dc177e65f956e16ae79f7ab5a0cb83 /src/mesa/drivers/dri/mga | |
parent | 157ec8bcf8b56d7951416d9ee13c98b7e82d099d (diff) |
Adjustments to make everything use IOCTL/sarea defines in DRM instead
of glx/mini. removes glx/mini/drm.h glx/mini/sarea.h
Diffstat (limited to 'src/mesa/drivers/dri/mga')
-rw-r--r-- | src/mesa/drivers/dri/mga/Makefile.solo | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/mga/mgacontext.h | 10 | ||||
-rw-r--r-- | src/mesa/drivers/dri/mga/mgaioctl.c | 20 | ||||
-rw-r--r-- | src/mesa/drivers/dri/mga/mgastate.c | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/mga/server/mga_dri.c | 11 | ||||
-rw-r--r-- | src/mesa/drivers/dri/mga/server/mga_sarea.h | 4 |
6 files changed, 24 insertions, 27 deletions
diff --git a/src/mesa/drivers/dri/mga/Makefile.solo b/src/mesa/drivers/dri/mga/Makefile.solo index 6d078e68688..b4cee99bed8 100644 --- a/src/mesa/drivers/dri/mga/Makefile.solo +++ b/src/mesa/drivers/dri/mga/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/mga/mgacontext.h b/src/mesa/drivers/dri/mga/mgacontext.h index 97ea04256d1..f2ef14a8ab7 100644 --- a/src/mesa/drivers/dri/mga/mgacontext.h +++ b/src/mesa/drivers/dri/mga/mgacontext.h @@ -278,12 +278,12 @@ struct mga_context_t { int drawX, drawY; /* origin of drawable in draw buffer */ int lastX, lastY; /* detect DSTORG bug */ GLuint numClipRects; /* cliprects for the draw buffer */ - XF86DRIClipRectPtr pClipRects; - XF86DRIClipRectRec draw_rect; - XF86DRIClipRectRec scissor_rect; + drm_clip_rect_t *pClipRects; + drm_clip_rect_t draw_rect; + drm_clip_rect_t scissor_rect; int scissor; - XF86DRIClipRectRec tmp_boxes[2][MGA_NR_SAREA_CLIPRECTS]; + drm_clip_rect_t tmp_boxes[2][MGA_NR_SAREA_CLIPRECTS]; /* Texture aging and DMA based aging. @@ -296,7 +296,7 @@ struct mga_context_t { /* Mirrors of some DRI state. */ drmContext hHWContext; - drmLock *driHwLock; + drm_hw_lock_t *driHwLock; int driFd; __DRIdrawablePrivate *driDrawable; __DRIdrawablePrivate *driReadable; diff --git a/src/mesa/drivers/dri/mga/mgaioctl.c b/src/mesa/drivers/dri/mga/mgaioctl.c index 1179be1eb66..f4cc055d142 100644 --- a/src/mesa/drivers/dri/mga/mgaioctl.c +++ b/src/mesa/drivers/dri/mga/mgaioctl.c @@ -218,8 +218,8 @@ mgaClear( GLcontext *ctx, GLbitfield mask, GLboolean all, for (i = 0 ; i < mmesa->numClipRects ; ) { int nr = MIN2(i + MGA_NR_SAREA_CLIPRECTS, mmesa->numClipRects); - XF86DRIClipRectPtr box = mmesa->pClipRects; - XF86DRIClipRectPtr b = mmesa->sarea->boxes; + drm_clip_rect_t *box = mmesa->pClipRects; + drm_clip_rect_t *b = mmesa->sarea->boxes; int n = 0; if (!all) { @@ -245,7 +245,7 @@ mgaClear( GLcontext *ctx, GLbitfield mask, GLboolean all, } } else { for ( ; i < nr ; i++) { - *b++ = *(XF86DRIClipRectPtr)&box[i]; + *b++ = box[i]; n++; } } @@ -325,7 +325,7 @@ static void mgaWaitForFrameCompletion( mgaContextPtr mmesa ) void mgaCopyBuffer( const __DRIdrawablePrivate *dPriv ) { mgaContextPtr mmesa; - XF86DRIClipRectPtr pbox; + drm_clip_rect_t *pbox; GLint nbox; GLint ret; GLint i; @@ -363,7 +363,7 @@ void mgaCopyBuffer( const __DRIdrawablePrivate *dPriv ) for (i = 0 ; i < nbox ; ) { int nr = MIN2(i + MGA_NR_SAREA_CLIPRECTS, dPriv->numClipRects); - XF86DRIClipRectPtr b = mmesa->sarea->boxes; + drm_clip_rect_t *b = mmesa->sarea->boxes; mmesa->sarea->nbox = nr - i; @@ -428,9 +428,9 @@ void mgaWaitAge( mgaContextPtr mmesa, int age ) } -static GLboolean intersect_rect( XF86DRIClipRectPtr out, - const XF86DRIClipRectPtr a, - const XF86DRIClipRectPtr b ) +static GLboolean intersect_rect( drm_clip_rect_t *out, + const drm_clip_rect_t *a, + const drm_clip_rect_t *b ) { *out = *a; if (b->x1 > out->x1) out->x1 = b->x1; @@ -456,7 +456,7 @@ static int __break_vertex = 0; void mgaFlushVerticesLocked( mgaContextPtr mmesa ) { - XF86DRIClipRectPtr pbox = mmesa->pClipRects; + drm_clip_rect_t *pbox = mmesa->pClipRects; int nbox = mmesa->numClipRects; drmBufPtr buffer = mmesa->vertex_dma_buffer; drmMGAVertex vertex; @@ -508,7 +508,7 @@ void mgaFlushVerticesLocked( mgaContextPtr mmesa ) for (i = 0 ; i < nbox ; ) { int nr = MIN2(i + MGA_NR_SAREA_CLIPRECTS, nbox); - XF86DRIClipRectPtr b = mmesa->sarea->boxes; + drm_clip_rect_t *b = mmesa->sarea->boxes; int discard = 0; if (mmesa->scissor) { diff --git a/src/mesa/drivers/dri/mga/mgastate.c b/src/mesa/drivers/dri/mga/mgastate.c index 2066b934364..f16557dc1ef 100644 --- a/src/mesa/drivers/dri/mga/mgastate.c +++ b/src/mesa/drivers/dri/mga/mgastate.c @@ -746,7 +746,7 @@ static void mgaXMesaSetFrontClipRects( mgaContextPtr mmesa ) __DRIdrawablePrivate *driDrawable = mmesa->driDrawable; if (driDrawable->numClipRects == 0) { - static XF86DRIClipRectRec zeroareacliprect = {0,0,0,0}; + static drm_clip_rect_t zeroareacliprect = {0,0,0,0}; mmesa->numClipRects = 1; mmesa->pClipRects = &zeroareacliprect; } else { @@ -768,7 +768,7 @@ static void mgaXMesaSetBackClipRects( mgaContextPtr mmesa ) if (driDrawable->numBackClipRects == 0) { if (driDrawable->numClipRects == 0) { - static XF86DRIClipRectRec zeroareacliprect = {0,0,0,0}; + static drm_clip_rect_t zeroareacliprect = {0,0,0,0}; mmesa->numClipRects = 1; mmesa->pClipRects = &zeroareacliprect; } else { diff --git a/src/mesa/drivers/dri/mga/server/mga_dri.c b/src/mesa/drivers/dri/mga/server/mga_dri.c index 19ddb38510f..eab4ab087a3 100644 --- a/src/mesa/drivers/dri/mga/server/mga_dri.c +++ b/src/mesa/drivers/dri/mga/server/mga_dri.c @@ -43,9 +43,6 @@ #include "mga_dri.h" #include "mga_sarea.h" -#include "sarea.h" - - /* Quiescence, locking */ @@ -367,7 +364,7 @@ static int MGADRIKernelInit( struct DRIDriverContextRec *ctx, MGAPtr pMga ) memset( &init, 0, sizeof(drmMGAInit) ); init.func = MGA_INIT_DMA; - init.sarea_priv_offset = sizeof(XF86DRISAREARec); + init.sarea_priv_offset = sizeof(drm_sarea_t); switch ( pMga->Chipset ) { case PCI_CHIP_MGAG550: @@ -624,7 +621,7 @@ static void print_client_msg( MGADRIPtr pMGADRI ) pMGADRI->primary.size = pMga->primary.size; pMGADRI->buffers.handle = pMga->buffers.handle; pMGADRI->buffers.size = pMga->buffers.size; - pMGADRI->sarea_priv_offset = sizeof(XF86DRISAREARec); + pMGADRI->sarea_priv_offset = sizeof(drm_sarea_t); #endif } @@ -801,7 +798,7 @@ static int MGAScreenInit( struct DRIDriverContextRec *ctx, MGAPtr pMga ) { MGASAREAPrivPtr pSAREAPriv; pSAREAPriv = (MGASAREAPrivPtr)(((char*)ctx->pSAREA) + - sizeof(XF86DRISAREARec)); + sizeof(drm_sarea_t)); memset(pSAREAPriv, 0, sizeof(*pSAREAPriv)); } @@ -872,7 +869,7 @@ static int MGAScreenInit( struct DRIDriverContextRec *ctx, MGAPtr pMga ) pMGADRI->primary.size = pMga->primary.size; pMGADRI->buffers.handle = pMga->buffers.handle; pMGADRI->buffers.size = pMga->buffers.size; - pMGADRI->sarea_priv_offset = sizeof(XF86DRISAREARec); + pMGADRI->sarea_priv_offset = sizeof(drm_sarea_t); print_client_msg( pMGADRI ); diff --git a/src/mesa/drivers/dri/mga/server/mga_sarea.h b/src/mesa/drivers/dri/mga/server/mga_sarea.h index 8bfa3f51d55..747626d8abf 100644 --- a/src/mesa/drivers/dri/mga/server/mga_sarea.h +++ b/src/mesa/drivers/dri/mga/server/mga_sarea.h @@ -176,7 +176,7 @@ typedef struct { /* The current cliprects, or a subset thereof. */ - XF86DRIClipRectRec boxes[MGA_NR_SAREA_CLIPRECTS]; + drm_clip_rect_t boxes[MGA_NR_SAREA_CLIPRECTS]; unsigned int nbox; /* Information about the most recently used 3d drawable. The @@ -197,7 +197,7 @@ typedef struct { unsigned int exported_nback; int exported_back_x, exported_front_x, exported_w; int exported_back_y, exported_front_y, exported_h; - XF86DRIClipRectRec exported_boxes[MGA_NR_SAREA_CLIPRECTS]; + drm_clip_rect_t exported_boxes[MGA_NR_SAREA_CLIPRECTS]; /* Counters for aging textures and for client-side throttling. */ |