__DRIdrawablePrivate *dPriv = imesa->driDrawable;
const GLuint colorMask = *((GLuint *) &ctx->Color.ColorMask);
drmI810Clear clear;
- int i;
+ unsigned int i;
clear.flags = 0;
clear.clear_color = imesa->ClearColor;
I810_FIREVERTICES( imesa );
- if ((mask & DD_FRONT_LEFT_BIT) && colorMask == ~0) {
+ if ((mask & BUFFER_BIT_FRONT_LEFT) && colorMask == ~0U) {
clear.flags |= I810_FRONT;
- mask &= ~DD_FRONT_LEFT_BIT;
+ mask &= ~BUFFER_BIT_FRONT_LEFT;
}
- if ((mask & DD_BACK_LEFT_BIT) && colorMask == ~0) {
+ if ((mask & BUFFER_BIT_BACK_LEFT) && colorMask == ~0U) {
clear.flags |= I810_BACK;
- mask &= ~DD_BACK_LEFT_BIT;
+ mask &= ~BUFFER_BIT_BACK_LEFT;
}
- if (mask & DD_DEPTH_BIT) {
+ if (mask & BUFFER_BIT_DEPTH) {
if (ctx->Depth.Mask)
clear.flags |= I810_DEPTH;
- mask &= ~DD_DEPTH_BIT;
+ mask &= ~BUFFER_BIT_DEPTH;
}
if (clear.flags) {
for (i = 0 ; i < imesa->numClipRects ; )
{
- int nr = MIN2(i + I810_NR_SAREA_CLIPRECTS, imesa->numClipRects);
- XF86DRIClipRectPtr box = imesa->pClipRects;
- XF86DRIClipRectPtr b = imesa->sarea->boxes;
+ unsigned int nr = MIN2(i + I810_NR_SAREA_CLIPRECTS, imesa->numClipRects);
+ drm_clip_rect_t *box = imesa->pClipRects;
+ drm_clip_rect_t *b = (drm_clip_rect_t *)imesa->sarea->boxes;
int n = 0;
if (!all) {
}
} else {
for ( ; i < nr ; i++) {
- *b++ = *(XF86DRIClipRectPtr)&box[i];
+ *b++ = box[i];
n++;
}
}
void i810CopyBuffer( const __DRIdrawablePrivate *dPriv )
{
i810ContextPtr imesa;
- XF86DRIClipRectPtr pbox;
+ drm_clip_rect_t *pbox;
int nbox, i, tmp;
assert(dPriv);
I810_FIREVERTICES( imesa );
LOCK_HARDWARE( imesa );
- pbox = dPriv->pClipRects;
+ pbox = (drm_clip_rect_t *)dPriv->pClipRects;
nbox = dPriv->numClipRects;
for (i = 0 ; i < nbox ; )
{
int nr = MIN2(i + I810_NR_SAREA_CLIPRECTS, dPriv->numClipRects);
- XF86DRIClipRectRec *b = (XF86DRIClipRectRec *)imesa->sarea->boxes;
+ drm_clip_rect_t *b = (drm_clip_rect_t *)imesa->sarea->boxes;
imesa->sarea->nbox = nr - i;
LOCK_HARDWARE( imesa );
if (dPriv->pClipRects) {
- *(XF86DRIClipRectRec *)imesa->sarea->boxes = dPriv->pClipRects[0];
- imesa->sarea->nbox = 1;
+ memcpy(&(imesa->sarea->boxes[0]), &(dPriv->pClipRects[0]),
+ sizeof(drm_clip_rect_t));
+ imesa->sarea->nbox = 1;
}
ret = drmCommandNone(imesa->driFd, DRM_I810_FLIP);
if (ret) {
}
/* i810SetDrawBuffer( imesa->glCtx, imesa->glCtx->Color.DriverDrawBuffer );*/
- i810DrawBuffer( imesa->glCtx, imesa->glCtx->Color.DrawBuffer );
+ i810DrawBuffer( imesa->glCtx, imesa->glCtx->Color.DrawBuffer[0] );
imesa->upload_cliprects = GL_TRUE;
imesa->lastSwap = tmp;
return;
-static int intersect_rect( XF86DRIClipRectPtr out,
- XF86DRIClipRectPtr a,
- XF86DRIClipRectPtr b )
+static int intersect_rect( drm_clip_rect_t *out,
+ drm_clip_rect_t *a,
+ drm_clip_rect_t *b )
{
*out = *a;
if (b->x1 > out->x1) out->x1 = b->x1;
void i810FlushPrimsLocked( i810ContextPtr imesa )
{
- XF86DRIClipRectPtr pbox = (XF86DRIClipRectPtr)imesa->pClipRects;
+ drm_clip_rect_t *pbox = imesa->pClipRects;
int nbox = imesa->numClipRects;
drmBufPtr buffer = imesa->vertex_buffer;
I810SAREAPtr sarea = imesa->sarea;
for (i = 0 ; i < nbox ; )
{
int nr = MIN2(i + I810_NR_SAREA_CLIPRECTS, nbox);
- XF86DRIClipRectPtr b = sarea->boxes;
+ drm_clip_rect_t *b = (drm_clip_rect_t *)sarea->boxes;
if (imesa->scissor) {
sarea->nbox = 0;