diff options
author | Keith Packard <keithp@keithp.com> | 2004-05-20 05:27:03 +0000 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2004-05-20 05:27:03 +0000 |
commit | b9d920f3dc060d230a4a7b2d40210524acf50666 (patch) | |
tree | 8cc234ab89b01ea35ef54863a0ecd22e00483961 | |
parent | 94648799c82e59166155ca5abf22a9391693e6a1 (diff) |
Fix SYNC_ALWAYS (debugging) code to use mach64WaitIdle instead of
KdCheckSync -- the boolean used in the latter won't be set yet.
Oops. == instead of =.
Must sync hardware before rasterizing trapezoids in case the mask is in
off-screen memory and has just been erased. Yes, it is silly to place
masks in off-screen memory. That's a separate issue.
-rw-r--r-- | hw/kdrive/mach64/mach64draw.c | 29 | ||||
-rw-r--r-- | hw/kdrive/src/kaa.c | 2 | ||||
-rw-r--r-- | hw/kdrive/src/kdrive.h | 6 | ||||
-rw-r--r-- | hw/kdrive/src/kpict.c | 11 |
4 files changed, 30 insertions, 18 deletions
diff --git a/hw/kdrive/mach64/mach64draw.c b/hw/kdrive/mach64/mach64draw.c index 5f46e32a5..e6c0a496c 100644 --- a/hw/kdrive/mach64/mach64draw.c +++ b/hw/kdrive/mach64/mach64draw.c @@ -65,9 +65,6 @@ CARD8 mach64Rop[16] = { #define MACH64_DRAW_COMBO_COPY 0x8 #define SYNC_ALWAYS 0 -#if SYNC_ALWAYS -static ScreenPtr mach64Screen; -#endif static Reg *reg; static CARD32 avail; static CARD32 triple; @@ -114,7 +111,7 @@ static const Mach64AccelReg mach64AccelReg[] = { { 1, 1, /* DP_PIX_WIDTH */ ((PIX_FORMAT_MONO << 0) | /* DP_DST_PIX_WIDTH */ - (PIX_FORMAT_TRUE_8888 << 4) | /* COMPOSITE_PIX_WIDTH */ + (PIX_FORMAT_MONO << 4) | /* COMPOSITE_PIX_WIDTH */ (PIX_FORMAT_MONO << 8) | /* DP_SRC_PIX_WIDTH */ (0 << 13) | /* DP_HOST_TRIPLE_EN */ (0 << 14) | /* DP_PALETTE_TYPE */ @@ -124,7 +121,7 @@ static const Mach64AccelReg mach64AccelReg[] = { (0 << 25) | /* DP_CONVERSION_TEMP */ (0 << 26) | /* DP_C14_RGB_LOW_NIBBLE */ (0 << 27) | /* DP_C14_RGB_HIGH_NIBBLE */ - (PIX_FORMAT_TRUE_8888 << 28) | /* DP_SCALE_PIX_WIDTH */ + (PIX_FORMAT_MONO << 28) | /* DP_SCALE_PIX_WIDTH */ 0), /* DP_SET_GUI_ENGINE */ ((PIX_FORMAT_MONO << 3) | @@ -146,7 +143,7 @@ static const Mach64AccelReg mach64AccelReg[] = { { 8, 8, /* DP_PIX_WIDTH */ ((PIX_FORMAT_PSEUDO_8 << 0) | /* DP_DST_PIX_WIDTH */ - (PIX_FORMAT_TRUE_8888 << 4) | /* COMPOSITE_PIX_WIDTH */ + (PIX_FORMAT_PSEUDO_8 << 4) | /* COMPOSITE_PIX_WIDTH */ (PIX_FORMAT_PSEUDO_8 << 8) | /* DP_SRC_PIX_WIDTH */ (0 << 13) | /* DP_HOST_TRIPLE_EN */ (0 << 14) | /* DP_PALETTE_TYPE */ @@ -156,7 +153,7 @@ static const Mach64AccelReg mach64AccelReg[] = { (0 << 25) | /* DP_CONVERSION_TEMP */ (0 << 26) | /* DP_C14_RGB_LOW_NIBBLE */ (0 << 27) | /* DP_C14_RGB_HIGH_NIBBLE */ - (PIX_FORMAT_TRUE_8888 << 28) | /* DP_SCALE_PIX_WIDTH */ + (PIX_FORMAT_PSEUDO_8 << 28) | /* DP_SCALE_PIX_WIDTH */ 0), /* DP_SET_GUI_ENGINE */ ((PIX_FORMAT_PSEUDO_8 << 3) | @@ -178,7 +175,7 @@ static const Mach64AccelReg mach64AccelReg[] = { { 15, 16, /* DP_PIX_WIDTH */ ((PIX_FORMAT_TRUE_1555 << 0) | /* DP_DST_PIX_WIDTH */ - (PIX_FORMAT_TRUE_8888 << 4) | /* COMPOSITE_PIX_WIDTH */ + (PIX_FORMAT_TRUE_1555 << 4) | /* COMPOSITE_PIX_WIDTH */ (PIX_FORMAT_TRUE_1555 << 8) | /* DP_SRC_PIX_WIDTH */ (0 << 13) | /* DP_HOST_TRIPLE_EN */ (0 << 14) | /* DP_PALETTE_TYPE */ @@ -188,7 +185,7 @@ static const Mach64AccelReg mach64AccelReg[] = { (0 << 25) | /* DP_CONVERSION_TEMP */ (0 << 26) | /* DP_C14_RGB_LOW_NIBBLE */ (0 << 27) | /* DP_C14_RGB_HIGH_NIBBLE */ - (PIX_FORMAT_TRUE_8888 << 28) | /* DP_SCALE_PIX_WIDTH */ + (PIX_FORMAT_TRUE_1555 << 28) | /* DP_SCALE_PIX_WIDTH */ 0), /* DP_SET_GUI_ENGINE */ ((PIX_FORMAT_TRUE_1555 << 3) | @@ -210,7 +207,7 @@ static const Mach64AccelReg mach64AccelReg[] = { { 16, 16, /* DP_PIX_WIDTH */ ((PIX_FORMAT_TRUE_565 << 0) | /* DP_DST_PIX_WIDTH */ - (PIX_FORMAT_TRUE_8888 << 4) | /* COMPOSITE_PIX_WIDTH */ + (PIX_FORMAT_TRUE_565 << 4) | /* COMPOSITE_PIX_WIDTH */ (PIX_FORMAT_TRUE_565 << 8) | /* DP_SRC_PIX_WIDTH */ (0 << 13) | /* DP_HOST_TRIPLE_EN */ (0 << 14) | /* DP_PALETTE_TYPE */ @@ -220,7 +217,7 @@ static const Mach64AccelReg mach64AccelReg[] = { (0 << 25) | /* DP_CONVERSION_TEMP */ (0 << 26) | /* DP_C14_RGB_LOW_NIBBLE */ (0 << 27) | /* DP_C14_RGB_HIGH_NIBBLE */ - (PIX_FORMAT_TRUE_8888 << 28) | /* DP_SCALE_PIX_WIDTH */ + (PIX_FORMAT_TRUE_565 << 28) | /* DP_SCALE_PIX_WIDTH */ 0), /* DP_SET_GUI_ENGINE */ ((PIX_FORMAT_TRUE_565 << 3) | @@ -252,7 +249,7 @@ static const Mach64AccelReg mach64AccelReg[] = { (0 << 25) | /* DP_CONVERSION_TEMP */ (0 << 26) | /* DP_C14_RGB_LOW_NIBBLE */ (0 << 27) | /* DP_C14_RGB_HIGH_NIBBLE */ - (PIX_FORMAT_TRUE_8888 << 28) | /* DP_SCALE_PIX_WIDTH */ + (PIX_FORMAT_PSEUDO_8 << 28) | /* DP_SCALE_PIX_WIDTH */ 0), /* DP_SET_GUI_ENGINE */ ((PIX_FORMAT_PSEUDO_8 << 3) | @@ -353,6 +350,7 @@ mach64Setup (PixmapPtr pDst, PixmapPtr pSrc, CARD32 combo, int wait) CARD32 DP_SET_GUI_ENGINE; int i; + KdCheckSync (pScreen); for (i = 0; i < NACCELREG; i++) if (mach64AccelReg[i].depth == pDst->drawable.depth && mach64AccelReg[i].bitsPerPixel == pDst->drawable.bitsPerPixel) @@ -364,9 +362,6 @@ mach64Setup (PixmapPtr pDst, PixmapPtr pSrc, CARD32 combo, int wait) reg = mach64c->reg; triple = (pDst->drawable.bitsPerPixel == 24); -#if SYNC_ALWAYS - mach64Screen = pScreen; -#endif if (!reg) return FALSE; @@ -439,7 +434,7 @@ static void mach64DoneSolid (void) { #if SYNC_ALWAYS - KdCheckSync (mach64Screen); + mach64WaitIdle (reg); #endif } @@ -526,7 +521,7 @@ static void mach64DoneCopy (void) { #if SYNC_ALWAYS - KdCheckSync (mach64Screen); + mach64WaitIdle (reg); #endif } diff --git a/hw/kdrive/src/kaa.c b/hw/kdrive/src/kaa.c index 616c0ef91..4a3350089 100644 --- a/hw/kdrive/src/kaa.c +++ b/hw/kdrive/src/kaa.c @@ -291,7 +291,7 @@ kaaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth) return NULL; pKaaPixmap = KaaGetPixmapPriv(pPixmap); if (!w || !h) - pKaaPixmap->score == KAA_PIXMAP_SCORE_PINNED; + pKaaPixmap->score = KAA_PIXMAP_SCORE_PINNED; else pKaaPixmap->score = KAA_PIXMAP_SCORE_INIT; diff --git a/hw/kdrive/src/kdrive.h b/hw/kdrive/src/kdrive.h index c0fae276e..a8015e7ab 100644 --- a/hw/kdrive/src/kdrive.h +++ b/hw/kdrive/src/kdrive.h @@ -849,6 +849,12 @@ KdCheckComposite (CARD8 op, INT16 yDst, CARD16 width, CARD16 height); + +void +KdCheckRasterizeTrapezoid(PicturePtr pMask, + xTrapezoid *trap, + int x_off, + int y_off); #endif /* kshadow.c */ diff --git a/hw/kdrive/src/kpict.c b/hw/kdrive/src/kpict.c index 25fb449a0..d1709b68e 100644 --- a/hw/kdrive/src/kpict.c +++ b/hw/kdrive/src/kpict.c @@ -60,10 +60,21 @@ KdCheckComposite (CARD8 op, } void +KdCheckRasterizeTrapezoid(PicturePtr pMask, + xTrapezoid *trap, + int x_off, + int y_off) +{ + KdCheckSync (pMask->pDrawable->pScreen); + fbRasterizeTrapezoid (pMask, trap, x_off, y_off); +} + +void KdPictureInitAsync (ScreenPtr pScreen) { PictureScreenPtr ps; ps = GetPictureScreen(pScreen); ps->Composite = KdCheckComposite; + ps->RasterizeTrapezoid = KdCheckRasterizeTrapezoid; } |