pXAAInfo->ScanlineCPUToScreenColorExpandFillFlags = LEFT_EDGE_CLIPPING | LEFT_EDGE_CLIPPING_NEGATIVE_X | CPU_TRANSFER_PAD_DWORD | SCANLINE_PAD_DWORD;  if (pATI->XModifier != 1) pXAAInfo->ScanlineCPUToScreenColorExpandFillFlags |= TRIPLE_BITS_24BPP; pXAAInfo->NumScanlineColorExpandBuffers = 1;   pATI->ExpansionBitmapWidth =         ((pATI->displayWidth * pATI->XModifier) + 31) & ~31U; pATI->ExpansionBitmapScanlinePtr[1] = (CARD32 *)xnfalloc((pATI->ExpansionBitmapWidth >> 3) + 63); pATI->ExpansionBitmapScanlinePtr[0] = (pointer)(((unsigned long)pATI->ExpansionBitmapScanlinePtr[1] + 63) & ~63UL); pXAAInfo->ScanlineColorExpandBuffers = (CARD8 **)pATI->ExpansionBitmapScanlinePtr; pXAAInfo->SetupForScanlineCPUToScreenColorExpandFill = ATIMach64SetupForScanlineCPUToScreenColorExpandFill; pXAAInfo->SubsequentScanlineCPUToScreenColorExpandFill = ATIMach64SubsequentScanlineCPUToScreenColorExpandFill; pXAAInfo->SubsequentColorExpandScanline = ATIMach64SubsequentColorExpandScanline;   if (pATI->XModifier != 1) return ATIMach64MaxY;   pXAAInfo->SetupForSolidLine = ATIMach64SetupForSolidLine; pXAAInfo->SubsequentSolidHorVertLine = ATIMach64SubsequentSolidHorVertLine; pXAAInfo->SubsequentSolidBresenhamLine = ATIMach64SubsequentSolidBresenhamLine; return PnozzMaxY;
PnozzAccelInit(ScrnInfoPtr pScrn){    PnozzPtr pPnozz = GET_PNOZZ_FROM_SCRN(pScrn);    XAAInfoRecPtr pXAAInfo=pPnozz->pXAA;    pXAAInfo->Flags = LINEAR_FRAMEBUFFER | PIXMAP_CACHE | OFFSCREEN_PIXMAPS;    pXAAInfo->maxOffPixWidth=pPnozz->width;    pXAAInfo->maxOffPixHeight=pPnozz->maxheight;    MaxClip=((pPnozz->scanlinesize&0xffff)<< 16)|(pPnozz->maxheight);        PnozzInitEngine(pPnozz);    #if 0    {	CARD32 src, srcw, junk;	src=0;	srcw=(pPnozz->width>>1)<<16|(pPnozz->height>>1);	PnozzSync(pScrn);	pnozz_write_4(pPnozz,FOREGROUND_COLOR,0x00ffff00);	pnozz_write_4(pPnozz,BACKGROUND_COLOR,0x00ffffff);	pnozz_write_4(pPnozz,RASTER_OP,ROP_PAT);	pnozz_write_4(pPnozz,COORD_INDEX,0);	pnozz_write_4(pPnozz,RECT_RTW_XY,src);	pnozz_write_4(pPnozz,RECT_RTW_XY,srcw);		junk=pnozz_read_4(pPnozz,COMMAND_QUAD);	PnozzSync(pScrn);    }#endif#if 1    {    	unsigned short *sptr = pPnozz->fb;	int i,j;	unsigned short blah;	/*	for (i = 0; i < 600; i++) {	    for (j = 0; j < 400; j++) {	    	if (j & 4) {		    	*sptr = 0xffff;		} else {			*sptr = 0;		}		sptr++;	    }	}	*/	for (i = 0; i < 400; i++) {	    *sptr = 0xffff;	    sptr++;	    *sptr = 0x0000;	    sptr+=800;	 }    }#endif    /* Sync */    pXAAInfo->Sync = PnozzSync;    /* Screen-to-screen copy */    pXAAInfo->ScreenToScreenCopyFlags=NO_TRANSPARENCY;    pXAAInfo->SetupForScreenToScreenCopy = PnozzSetupForScreenToScreenCopy;    pXAAInfo->SubsequentScreenToScreenCopy =        PnozzSubsequentScreenToScreenCopy;    /* Solid fills */    pXAAInfo->SetupForSolidFill = PnozzSetupForSolidFill;    pXAAInfo->SubsequentSolidFillRect = PnozzSubsequentSolidFillRect;#if 0    /* 8x8 mono pattern fills */    pXAAInfo->Mono8x8PatternFillFlags = BIT_ORDER_IN_BYTE_MSBFIRST |	HARDWARE_PATTERN_PROGRAMMED_BITS | HARDWARE_PATTERN_SCREEN_ORIGIN;	    pXAAInfo->SetupForMono8x8PatternFill = PnozzSetupForMono8x8PatternFill;    pXAAInfo->SubsequentMono8x8PatternFillRect =        PnozzSubsequentMono8x8PatternFillRect;/* XXX */    pXAAInfo->ScanlineCPUToScreenColorExpandFillFlags =        LEFT_EDGE_CLIPPING | LEFT_EDGE_CLIPPING_NEGATIVE_X |        CPU_TRANSFER_PAD_DWORD | SCANLINE_PAD_DWORD;	    if (pATI->XModifier != 1)        pXAAInfo->ScanlineCPUToScreenColorExpandFillFlags |= TRIPLE_BITS_24BPP;    pXAAInfo->NumScanlineColorExpandBuffers = 1;    /* Align bitmap data on a 64-byte boundary */    pATI->ExpansionBitmapWidth =        /* DWord size in bits */        ((pATI->displayWidth * pATI->XModifier) + 31) & ~31U;    pATI->ExpansionBitmapScanlinePtr[1] =        (CARD32 *)xnfalloc((pATI->ExpansionBitmapWidth >> 3) + 63);    pATI->ExpansionBitmapScanlinePtr[0] =        (pointer)(((unsigned long)pATI->ExpansionBitmapScanlinePtr[1] + 63) &                  ~63UL);    pXAAInfo->ScanlineColorExpandBuffers =        (CARD8 **)pATI->ExpansionBitmapScanlinePtr;    pXAAInfo->SetupForScanlineCPUToScreenColorExpandFill =        ATIMach64SetupForScanlineCPUToScreenColorExpandFill;    pXAAInfo->SubsequentScanlineCPUToScreenColorExpandFill =        ATIMach64SubsequentScanlineCPUToScreenColorExpandFill;    pXAAInfo->SubsequentColorExpandScanline =        ATIMach64SubsequentColorExpandScanline;    /* The engine does not support the following primitives for 24bpp */    if (pATI->XModifier != 1)        return ATIMach64MaxY;    /* Solid lines */    pXAAInfo->SetupForSolidLine = ATIMach64SetupForSolidLine;    pXAAInfo->SubsequentSolidHorVertLine = ATIMach64SubsequentSolidHorVertLine;    pXAAInfo->SubsequentSolidBresenhamLine =        ATIMach64SubsequentSolidBresenhamLine;    return PnozzMaxY;#endif    return 0;}