1457
1276
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
1458
1277
SavagePtr psav = SAVPTR(pScrn);
1459
XAAInfoRecPtr xaaptr;
1462
/* Set-up our GE command primitive */
1464
if (pScrn->depth == 8) {
1465
psav->PlaneMask = 0xFF;
1467
else if (pScrn->depth == 15) {
1468
psav->PlaneMask = 0x7FFF;
1470
else if (pScrn->depth == 16) {
1471
psav->PlaneMask = 0xFFFF;
1473
else if (pScrn->depth == 24) {
1474
psav->PlaneMask = 0xFFFFFF;
1477
/* General acceleration flags */
1479
if (!(xaaptr = psav->AccelInfoRec = XAACreateInfoRec()))
1485
| LINEAR_FRAMEBUFFER
1490
xaaptr->SetClippingRectangle = SavageSetClippingRectangle;
1491
xaaptr->DisableClipping = SavageDisableClipping;
1492
xaaptr->ClippingFlags = 0
1494
| HARDWARE_CLIP_SOLID_FILL
1495
| HARDWARE_CLIP_SOLID_LINE
1496
| HARDWARE_CLIP_DASHED_LINE
1498
| HARDWARE_CLIP_SCREEN_TO_SCREEN_COPY
1499
| HARDWARE_CLIP_MONO_8x8_FILL
1500
| HARDWARE_CLIP_COLOR_8x8_FILL
1503
xaaptr->Sync = SavageAccelSync;
1505
if(xf86IsEntityShared(pScrn->entityList[0]))
1509
pPriv = xf86GetEntityPrivate(pScrn->entityList[0],
1510
gSavageEntityIndex);
1513
/*if there are more than one devices sharing this entity, we
1514
have to assign this call back, otherwise the XAA will be
1516
if(pEnt->HasSecondary)
1517
xaaptr->RestoreAccelState = SavageRestoreAccelState;
1520
/* ScreenToScreen copies */
1524
xaaptr->SetupForScreenToScreenCopy = SavageSetupForScreenToScreenCopy;
1525
xaaptr->SubsequentScreenToScreenCopy = SavageSubsequentScreenToScreenCopy;
1526
xaaptr->ScreenToScreenCopyFlags = 0
1534
/* Solid filled rectangles */
1537
xaaptr->SetupForSolidFill = SavageSetupForSolidFill;
1538
xaaptr->SubsequentSolidFillRect = SavageSubsequentSolidFillRect;
1539
xaaptr->SolidFillFlags = NO_PLANEMASK | ROP_NEEDS_SOURCE;
1542
/* Mono 8x8 pattern fills */
1545
xaaptr->SetupForMono8x8PatternFill = SavageSetupForMono8x8PatternFill;
1546
xaaptr->SubsequentMono8x8PatternFillRect
1547
= SavageSubsequentMono8x8PatternFillRect;
1548
xaaptr->Mono8x8PatternFillFlags = 0
1549
| HARDWARE_PATTERN_PROGRAMMED_BITS
1550
| HARDWARE_PATTERN_SCREEN_ORIGIN
1551
| BIT_ORDER_IN_BYTE_MSBFIRST
1554
if( psav->Chipset == S3_SAVAGE4 )
1555
xaaptr->Mono8x8PatternFillFlags |= NO_TRANSPARENCY;
1558
/* Color 8x8 pattern fills */
1561
* With the exception of the Savage3D and Savage4, all of the Savage
1562
* chips require that bitmap descriptors have a stride that is a
1563
* multiple of 16 pixels. This includes any descriptor used for
1564
* color pattern fills, which COMPLETELY screws the XAA 8x8 color
1567
* We could double the width ourselves into a reserved frame buffer
1568
* section, but since I went 18 months with only ONE report of this
1569
* error, it seems hardly worth the trouble.
1573
if( (psav->Chipset == S3_SAVAGE3D) || (psav->Chipset == S3_SAVAGE4) )
1575
xaaptr->SetupForColor8x8PatternFill =
1576
SavageSetupForColor8x8PatternFill;
1577
xaaptr->SubsequentColor8x8PatternFillRect =
1578
SavageSubsequentColor8x8PatternFillRect;
1579
xaaptr->Color8x8PatternFillFlags = 0
1581
| HARDWARE_PATTERN_PROGRAMMED_BITS
1582
| HARDWARE_PATTERN_PROGRAMMED_ORIGIN
1590
xaaptr->SolidLineFlags = NO_PLANEMASK;
1591
xaaptr->SetupForSolidLine = SavageSetupForSolidFill;
1592
xaaptr->SubsequentSolidBresenhamLine = SavageSubsequentSolidBresenhamLine;
1594
xaaptr->SubsequentSolidFillTrap = SavageSubsequentSolidFillTrap;
1597
xaaptr->SolidBresenhamLineErrorTermBits = 13;
1602
xaaptr->ImageWriteFlags = 0
1604
| CPU_TRANSFER_PAD_DWORD
1605
| SCANLINE_PAD_DWORD
1606
| BIT_ORDER_IN_BYTE_MSBFIRST
1607
| LEFT_EDGE_CLIPPING
1609
xaaptr->SetupForImageWrite = SavageSetupForImageWrite;
1610
xaaptr->SubsequentImageWriteRect = SavageSubsequentImageWriteRect;
1611
xaaptr->NumScanlineImageWriteBuffers = 1;
1612
xaaptr->ImageWriteBase = psav->BciMem;
1613
xaaptr->ImageWriteRange = 120 * 1024;
1615
/* WriteBitmap color expand */
1618
xaaptr->WriteBitmapFlags = NO_PLANEMASK;
1619
xaaptr->WriteBitmap = SavageWriteBitmapCPUToScreenColorExpand;
1622
/* Screen to Screen color expansion. Not implemented. */
1625
xaaptr->SetupForScreenToScreenColorExpand =
1626
SavageSetupForScreenToScreenColorExpand;
1627
xaaptr->SubsequentScreenToScreenColorExpand =
1628
SavageSubsequentCPUToScreenColorExpand;
1631
/* CPU to Screen color expansion */
1633
xaaptr->ScanlineCPUToScreenColorExpandFillFlags = 0
1635
| CPU_TRANSFER_PAD_DWORD
1636
| SCANLINE_PAD_DWORD
1637
| BIT_ORDER_IN_BYTE_MSBFIRST
1638
| LEFT_EDGE_CLIPPING
1642
xaaptr->SetupForScanlineCPUToScreenColorExpandFill =
1643
SavageSetupForCPUToScreenColorExpandFill;
1644
xaaptr->SubsequentScanlineCPUToScreenColorExpandFill =
1645
SavageSubsequentScanlineCPUToScreenColorExpandFill;
1646
xaaptr->SubsequentColorExpandScanline =
1647
SavageSubsequentColorExpandScanline;
1648
xaaptr->ColorExpandBase = psav->BciMem;
1649
xaaptr->ScanlineColorExpandBuffers = &xaaptr->ColorExpandBase;
1650
xaaptr->NumScanlineColorExpandBuffers = 1;
1652
/* Set up screen parameters. */
1654
psav->Bpp = pScrn->bitsPerPixel / 8;
1655
psav->Bpl = pScrn->displayWidth * psav->Bpp;
1656
psav->ScissB = (psav->CursorKByte << 10) / psav->Bpl;
1657
if (psav->ScissB > 2047)
1658
psav->ScissB = 2047;
1661
* Finally, we set up the video memory space available to the pixmap
1662
* cache. In this case, all memory from the end of the virtual screen
1663
* to the end of the command overflow buffer can be used. If you haven't
1664
* enabled the PIXMAP_CACHE flag, then these lines can be omitted.
1668
1280
if (psav->directRenderingEnabled) {
1882
1494
psav->cyMemory = 0x7FFF;
1887
MemBox.x2 = psav->cxMemory;
1888
MemBox.y2 = psav->cyMemory;
1890
if (!xf86InitFBManager(pScreen, &MemBox)) {
1891
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
1892
"Memory manager initialization to (%d,%d) (%d,%d) failed\n",
1893
MemBox.x1, MemBox.y1, MemBox.x2, MemBox.y2 );
1896
int tmp,width, height;
1898
xf86DrvMsg( pScrn->scrnIndex, X_INFO,
1899
"Memory manager initialized to (%d,%d) (%d,%d)\n",
1900
MemBox.x1, MemBox.y1, MemBox.x2, MemBox.y2 );
1902
* because the alignment requirement,the on-screen need more memory
1903
* than (0,0,virtualX,virtualY), but xf86InitFBManager only subtract
1904
* (pScrn->virtualX * pScrn->virtualY from (0,0,cxMemory,cyMemory),so
1905
* here,we should reserve some memory for on-screen
1907
tmp = ((psav->cxMemory * pScrn->virtualY - pScrn->virtualX * pScrn->virtualY)
1908
+ psav->cxMemory -1) / (psav->cxMemory);
1910
xf86AllocateOffscreenArea(pScreen, psav->cxMemory,tmp, 0, NULL, NULL, NULL);
1912
if (xf86QueryLargestOffscreenArea(pScreen, &width,
1913
&height, 0, 0, 0 ) ) {
1914
xf86DrvMsg( pScrn->scrnIndex, X_INFO,
1915
"Largest offscreen area available: %d x %d\n",
1921
if(tiledBufferSize > bufferSize)
1923
psav->reserved = xf86AllocateOffscreenLinear(pScreen,
1924
(tiledBufferSize - bufferSize),1,0,0,0);
1928
xf86DrvMsg( pScrn->scrnIndex, X_INFO,
1929
"Reserved for tiled front buffer at offset 0x%08x ,size:0x%08x\n",
1930
psav->reserved->offset, psav->reserved->size);
1497
psav->EXAendfb = pSAVAGEDRIServer->backOffset & ~SAVAGE_BUFFER_ALIGN;
1932
1499
xf86DrvMsg( pScrn->scrnIndex, X_INFO,
1933
1500
"Reserved back buffer at offset 0x%x\n",
1952
1518
if (psav->cyMemory > 0x7FFF) {
1953
1519
psav->cyMemory = 0x7FFF;
1522
if (psav->IsPrimary) {
1523
psav->EXAendfb = psav->videoRambytes -
1524
4096 - /* hw cursor*/
1527
psav->EXAendfb = psav->videoRambytes -
1528
4096 - /* hw cursor*/
1529
psav->cobSize - /*COB*/
1958
AvailFBArea.x2 = psav->cxMemory;
1959
AvailFBArea.y2 = psav->cyMemory;
1960
xf86InitFBManager(pScreen, &AvailFBArea);
1962
* because the alignment requirement,the on-screen need more memory
1963
* than (0,0,virtualX,virtualY), but xf86InitFBManager only subtract
1964
* (pScrn->virtualX * pScrn->virtualY from (0,0,cxMemory,cyMemory),so
1965
* here,we should reserver some memory for on-screen
1967
tmp = ((psav->cxMemory * pScrn->virtualY - pScrn->virtualX * pScrn->virtualY)
1968
+ psav->cxMemory -1) / (psav->cxMemory);
1970
xf86AllocateOffscreenArea(pScreen, psav->cxMemory,tmp, 0, NULL, NULL, NULL);
1972
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
1973
"Using %d lines for offscreen memory.\n",
1974
psav->cyMemory - pScrn->virtualY );
1980
AvailFBArea.x2 = pScrn->displayWidth;
1981
AvailFBArea.y2 = psav->ScissB;
1982
xf86InitFBManager(pScreen, &AvailFBArea);
1983
xf86DrvMsg( pScrn->scrnIndex, X_INFO,
1984
"Using %d lines for offscreen memory.\n",
1985
psav->ScissB - pScrn->virtualY );
1989
return XAAInit(pScreen, xaaptr);
1995
/* The sync function for the GE */
1997
SavageAccelSync(ScrnInfoPtr pScrn)
1999
SavagePtr psav = SAVPTR(pScrn);
2000
psav->WaitIdleEmpty(psav);
2005
* The XAA ROP helper routines all assume that a solid color is a
2006
* "pattern". The Savage chips, however, apply a non-stippled solid
2007
* color as "source". Thus, we use a slightly customized version.
2011
SavageHelpPatternROP(ScrnInfoPtr pScrn, int *fg, int *bg, unsigned int pm, int *rop)
2013
XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCRNINFOPTR(pScrn);
2016
pm &= infoRec->FullPlanemask;
2018
if(pm == infoRec->FullPlanemask) {
2019
if(!NO_SRC_ROP(*rop))
2021
*rop = XAAGetCopyROP(*rop);
2035
ret |= ROP_PAT | ROP_SRC;
2038
*rop = XAAGetCopyROP_PM(*rop);
2046
SavageHelpSolidROP(ScrnInfoPtr pScrn, int *fg, unsigned int pm, int *rop)
2048
XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCRNINFOPTR(pScrn);
2051
pm &= infoRec->FullPlanemask;
2053
if(pm == infoRec->FullPlanemask) {
2054
if(!NO_SRC_ROP(*rop))
2056
*rop = XAAGetCopyROP(*rop);
2068
ret |= ROP_PAT | ROP_SRC;
2071
*rop = XAAGetCopyROP_PM(*rop);
2079
/* These are the ScreenToScreen bitblt functions. We support all ROPs, all
2080
* directions, and a planemask by adjusting the ROP and using the mono pattern
2083
* (That's a lie; we don't really support planemask.)
2087
SavageSetupForScreenToScreenCopy(
2093
int transparency_color)
2095
SavagePtr psav = SAVPTR(pScrn);
2098
cmd = BCI_CMD_RECT | BCI_CMD_DEST_PBD_NEW | BCI_CMD_SRC_SBD_COLOR_NEW;
2100
BCI_CMD_SET_ROP( cmd, XAAGetCopyROP(rop) );
2101
if (transparency_color != -1)
2102
cmd |= BCI_CMD_SEND_COLOR | BCI_CMD_SRC_TRANSPARENT;
2104
if (xdir == 1 ) cmd |= BCI_CMD_RECT_XP;
2105
if (ydir == 1 ) cmd |= BCI_CMD_RECT_YP;
2107
psav->SavedBciCmd = cmd;
2108
psav->SavedBgColor = transparency_color;
2112
SavageSubsequentScreenToScreenCopy(
2121
SavagePtr psav = SAVPTR(pScrn);
2125
if (!w || !h) return;
2127
if (!(psav->SavedBciCmd & BCI_CMD_RECT_XP)) {
2133
if (!(psav->SavedBciCmd & BCI_CMD_RECT_YP)) {
2140
psav->WaitQueue(psav,9);
2143
BCI_SEND(psav->SavedBciCmd);
2145
BCI_SEND(psav->GlobalBD.bd2.LoPart);
2146
BCI_SEND(psav->GlobalBD.bd2.HiPart);
2148
BCI_SEND(psav->GlobalBD.bd2.LoPart);
2149
BCI_SEND(psav->GlobalBD.bd2.HiPart);
2151
if (psav->SavedBgColor != 0xffffffff)
2152
BCI_SEND(psav->SavedBgColor);
2153
BCI_SEND(BCI_X_Y(x1, y1));
2154
BCI_SEND(BCI_X_Y(x2, y2));
2155
BCI_SEND(BCI_W_H(w, h));
2160
* SetupForSolidFill is also called to set up for lines.
2164
SavageSetupForSolidFill(
2168
unsigned int planemask)
2170
SavagePtr psav = SAVPTR(pScrn);
2171
XAAInfoRecPtr xaaptr = GET_XAAINFORECPTR_FROM_SCRNINFOPTR( pScrn );
2176
| BCI_CMD_RECT_XP | BCI_CMD_RECT_YP
2177
| BCI_CMD_DEST_PBD_NEW | BCI_CMD_SRC_SOLID;
2179
/* Don't send a color if we don't have to. */
2185
else if( (unsigned int)color == xaaptr->FullPlanemask )
2189
mix = SavageHelpSolidROP( pScrn, &color, planemask, &rop );
2192
cmd |= BCI_CMD_SEND_COLOR;
2194
BCI_CMD_SET_ROP( cmd, rop );
2196
psav->SavedBciCmd = cmd;
2197
psav->SavedFgColor = color;
2202
SavageSubsequentSolidFillRect(
2209
SavagePtr psav = SAVPTR(pScrn);
2215
psav->WaitQueue(psav,7);
2217
BCI_SEND(psav->SavedBciCmd);
2219
BCI_SEND(psav->GlobalBD.bd2.LoPart);
2220
BCI_SEND(psav->GlobalBD.bd2.HiPart);
2222
if( psav->SavedBciCmd & BCI_CMD_SEND_COLOR )
2223
BCI_SEND(psav->SavedFgColor);
2224
BCI_SEND(BCI_X_Y(x, y));
2225
BCI_SEND(BCI_W_H(w, h));
2230
SavageSetupForScreenToScreenColorExpand(
2235
unsigned int planemask)
2237
/* SavagePtr psav = SAVPTR(pScrn); */
2241
SavageSubsequentScreenToScreenColorExpand(
2249
/* SavagePtr psav = SAVPTR(pScrn); */
2255
SavageSetupForCPUToScreenColorExpandFill(
2260
unsigned int planemask)
2262
SavagePtr psav = SAVPTR(pScrn);
2266
cmd = BCI_CMD_RECT | BCI_CMD_RECT_XP | BCI_CMD_RECT_YP
2268
| BCI_CMD_DEST_PBD_NEW | BCI_CMD_SRC_MONO;
2270
mix = SavageHelpPatternROP( pScrn, &fg, &bg, planemask, &rop );
2273
cmd |= BCI_CMD_SEND_COLOR;
2275
BCI_CMD_SET_ROP( cmd, rop );
2278
cmd |= BCI_CMD_SEND_COLOR;
2280
cmd |= BCI_CMD_SRC_TRANSPARENT;
2282
psav->SavedBciCmd = cmd;
2283
psav->SavedFgColor = fg;
2284
psav->SavedBgColor = bg;
2289
SavageSubsequentScanlineCPUToScreenColorExpandFill(
2297
SavagePtr psav = SAVPTR(pScrn);
2300
/* XAA will be sending bitmap data next. */
2301
/* We should probably wait for empty/idle here. */
2303
psav->WaitQueue(psav,22);
2305
BCI_SEND(psav->SavedBciCmd);
2307
BCI_SEND(psav->GlobalBD.bd2.LoPart);
2308
BCI_SEND(psav->GlobalBD.bd2.HiPart);
2310
BCI_SEND(BCI_CLIP_LR(x+skipleft, x+w-1));
2312
if( psav->SavedBciCmd & BCI_CMD_SEND_COLOR )
2313
BCI_SEND(psav->SavedFgColor);
2314
if( psav->SavedBgColor != 0xffffffff )
2315
BCI_SEND(psav->SavedBgColor);
2316
BCI_SEND(BCI_X_Y(x, y));
2317
BCI_SEND(BCI_W_H(w, 1));
2320
psav->Rect.y = y + 1;
2321
psav->Rect.width = w;
2322
psav->Rect.height = h - 1;
2326
SavageSubsequentColorExpandScanline(
2330
/* This gets call after each scanline's image data has been sent. */
2331
SavagePtr psav = SAVPTR(pScrn);
2332
xRectangle xr = psav->Rect;
2337
psav->WaitQueue(psav,20);
2338
BCI_SEND(BCI_X_Y( xr.x, xr.y));
2339
BCI_SEND(BCI_W_H( xr.width, 1 ));
2340
psav->Rect.height--;
2347
* The meaning of the two pattern paremeters to Setup & Subsequent for
2348
* Mono8x8Patterns varies depending on the flag bits. We specify
2349
* HW_PROGRAMMED_BITS, which means our hardware can handle 8x8 patterns
2350
* without caching in the frame buffer. Thus, Setup gets the pattern bits.
2351
* There is no way with BCI to rotate an 8x8 pattern, so we do NOT specify
2352
* HW_PROGRAMMED_ORIGIN. XAA wil rotate it for us and pass the rotated
2353
* pattern to both Setup and Subsequent. If we DID specify PROGRAMMED_ORIGIN,
2354
* then Setup would get the unrotated pattern, and Subsequent gets the
2359
SavageSetupForMono8x8PatternFill(
2366
unsigned int planemask)
2368
SavagePtr psav = SAVPTR(pScrn);
2372
mix = XAAHelpPatternROP( pScrn, &fg, &bg, planemask, &rop );
2374
cmd = BCI_CMD_RECT | BCI_CMD_RECT_XP | BCI_CMD_RECT_YP
2375
| BCI_CMD_DEST_PBD_NEW;
2378
cmd |= BCI_CMD_SEND_COLOR | BCI_CMD_PAT_MONO;
2381
cmd |= BCI_CMD_PAT_TRANSPARENT;
2383
BCI_CMD_SET_ROP(cmd, rop);
2385
psav->SavedBciCmd = cmd;
2386
psav->SavedFgColor = fg;
2387
psav->SavedBgColor = bg;
2392
SavageSubsequentMono8x8PatternFillRect(
2401
SavagePtr psav = SAVPTR(pScrn);
2405
* I didn't think it was my job to do trivial rejection, but
2406
* miFillGeneralPolygon definitely generates null spans, and XAA
2407
* just passes them through.
2413
psav->WaitQueue(psav,9);
2414
BCI_SEND(psav->SavedBciCmd);
2416
BCI_SEND(psav->GlobalBD.bd2.LoPart);
2417
BCI_SEND(psav->GlobalBD.bd2.HiPart);
2419
if( psav->SavedBciCmd & BCI_CMD_SEND_COLOR )
2420
BCI_SEND(psav->SavedFgColor);
2421
if( psav->SavedBgColor != 0xffffffff )
2422
BCI_SEND(psav->SavedBgColor);
2423
BCI_SEND(BCI_X_Y(x, y));
2424
BCI_SEND(BCI_W_H(w, h));
2425
if( psav->SavedBciCmd & BCI_CMD_PAT_MONO )
2435
SavageSetupForColor8x8PatternFill(
2443
SavagePtr psav = SAVPTR(pScrn);
2449
/* ViRGEs and Savages do not support transparent color patterns. */
2450
/* We set the NO_TRANSPARENCY bit, so we should never receive one. */
2452
pat_offset = (int) (patternx * psav->Bpp + patterny * psav->Bpl);
2454
cmd = BCI_CMD_RECT | BCI_CMD_RECT_XP | BCI_CMD_RECT_YP
2455
| BCI_CMD_DEST_GBD | BCI_CMD_PAT_PBD_COLOR_NEW;
2457
(void) XAAHelpSolidROP( pScrn, &trans_col, planemask, &rop );
2459
BCI_CMD_SET_ROP(cmd, rop);
2460
bd = BCI_BD_BW_DISABLE;
2461
BCI_BD_SET_BPP(bd, pScrn->bitsPerPixel);
2462
BCI_BD_SET_STRIDE(bd, 8);
2464
psav->SavedBciCmd = cmd;
2465
psav->SavedSbdOffset = pat_offset;
2466
psav->SavedSbd = bd;
2467
psav->SavedBgColor = trans_col;
2472
SavageSubsequentColor8x8PatternFillRect(
2481
SavagePtr psav = SAVPTR(pScrn);
2487
psav->WaitQueue(psav,6);
2488
BCI_SEND(psav->SavedBciCmd);
2489
BCI_SEND(psav->SavedSbdOffset);
2490
BCI_SEND(psav->SavedSbd);
2491
BCI_SEND(BCI_X_Y(patternx,patterny));
2492
BCI_SEND(BCI_X_Y(x, y));
2493
BCI_SEND(BCI_W_H(w, h));
2499
SavageSubsequentSolidBresenhamLine(
2509
SavagePtr psav = SAVPTR(pScrn);
2513
cmd = (psav->SavedBciCmd & 0x00ffffff);
2514
cmd |= BCI_CMD_LINE_LAST_PIXEL;
2517
ErrorF("BresenhamLine, (%4d,%4d), len %4d, oct %d, err %4d,%4d,%4d clr %08x\n",
2518
x1, y1, length, octant, e1, e2, err, psav->SavedFgColor );
2521
psav->WaitQueue(psav, 7 );
2524
BCI_SEND(psav->GlobalBD.bd2.LoPart);
2525
BCI_SEND(psav->GlobalBD.bd2.HiPart);
2527
if( cmd & BCI_CMD_SEND_COLOR )
2528
BCI_SEND( psav->SavedFgColor );
2529
BCI_SEND(BCI_LINE_X_Y(x1, y1));
2530
BCI_SEND(BCI_LINE_STEPS(e2-e1, e2));
2531
BCI_SEND(BCI_LINE_MISC(length,
2533
!(octant & XDECREASING),
2534
!(octant & YDECREASING),
2540
SavageSubsequentSolidTwoPointLine(
2548
SavagePtr psav = SAVPTR(pScrn);
2553
int min, max, xp, yp, ym;
2559
ErrorF("TwoPointLine, (%4d,%4d)-(%4d,%4d), clr %08x, last pt %s\n",
2560
x1, y1, x2, y2, psav->SavedFgColor, (bias & 0x100)?"NO ":"YES");
2583
if( !(bias & 0x100) ) {
2587
cmd = (psav->SavedBciCmd & 0x00ffffff);
2588
cmd |= BCI_CMD_LINE_LAST_PIXEL;
2590
psav->WaitQueue(psav,5);
2592
if( cmd & BCI_CMD_SEND_COLOR )
2593
BCI_SEND( psav->SavedFgColor );
2594
BCI_SEND( BCI_LINE_X_Y( x1, y1 ) );
2595
BCI_SEND( BCI_LINE_STEPS( 2 * (min - max), 2 * min ) );
2596
BCI_SEND( BCI_LINE_MISC( max, ym, xp, yp, 2 * min - max ) );
2602
SavageSetClippingRectangle(
2609
SavagePtr psav = SAVPTR(pScrn);
2614
ErrorF("ClipRect, (%4d,%4d)-(%4d,%4d) \n", x1, y1, x2, y2 );
2617
cmd = BCI_CMD_NOP | BCI_CMD_CLIP_NEW;
2618
psav->WaitQueue(psav,3);
2620
BCI_SEND(BCI_CLIP_TL(y1, x1));
2621
BCI_SEND(BCI_CLIP_BR(y2, x2));
2622
psav->SavedBciCmd |= BCI_CMD_CLIP_CURRENT;
2626
static void SavageDisableClipping( ScrnInfoPtr pScrn )
2628
SavagePtr psav = SAVPTR(pScrn);
2630
ErrorF("Kill ClipRect\n");
2632
psav->SavedBciCmd &= ~BCI_CMD_CLIP_CURRENT;
1536
return SavageEXAInit(pScreen);
1538
return SavageXAAInit(pScreen);
2636
1541
/* Routines for debugging. */