there's a glitch in directfb-0.9.8 ati128 gfxdriver that causes
rectangles to not get properly drawn under certain situations. this
affects at least my rage 128 mobility m3 (AGP) and so far i have been
unable to test the situation on other r128 family chips, so please
someone check out if the rendering is ok or not. basically this is what
happens: try to draw a horizontal line using the DrawLine call first,
then after that, just draw any rectangle with DrawRectangle or a filled
one with FillRectangle and you'll see it fails to draw the rectangles
except the first and last line. i even found the reason for that
behaviour; after the line draw function call, the DP_CNTL register has
been programmed to left-right or right-left direction depending on the
line that just got drawn, however, the rectangle routines do not set the
direction at all. so, it was a fairly simple fix. patch attached below:
===================================================================
RCS file: /var/cvs/directfb/gfxdrivers/ati128/ati128.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- directfb/gfxdrivers/ati128/ati128.c 2002/01/17 14:03:54 1.1
+++ directfb/gfxdrivers/ati128/ati128.c 2002/01/17 15:51:43 1.2
@@ -181,9 +181,11 @@
ATI128DeviceData *adev = (ATI128DeviceData*) dev;
volatile __u8 *mmio = adrv->mmio_base;
- ati128_waitfifo( adrv, adev, 4 );
+ ati128_waitfifo( adrv, adev, 5 );
/* set the destination datatype */
ati128_out32( mmio, DP_DATATYPE, adev->ATI_dst_bpp | BRUSH_SOLIDCOLOR );
+ /* set direction */
+ ati128_out32( mmio, DP_CNTL, DST_X_LEFT_TO_RIGHT | DST_Y_TOP_TO_BOTTOM);
/* set the drawing command */
ati128_out32( mmio, DP_MIX, ROP3_PATCOPY | DP_SRC_RECT );
/* set parameters */
@@ -237,9 +239,11 @@
ATI128DeviceData *adev = (ATI128DeviceData*) dev;
volatile __u8 *mmio = adrv->mmio_base;
- ati128_waitfifo( adrv, adev, 2 );
+ ati128_waitfifo( adrv, adev, 3 );
/* set the destination datatype */
ati128_out32( mmio, DP_DATATYPE, adev->ATI_dst_bpp | BRUSH_SOLIDCOLOR );
+ /* set direction */
+ ati128_out32( mmio, DP_CNTL, DST_X_LEFT_TO_RIGHT | DST_Y_TOP_TO_BOTTOM);
/* set the drawing command */
ati128_out32( mmio, DP_MIX, ROP3_PATCOPY | DP_SRC_RECT );
--
Info: To unsubscribe send a mail to [EMAIL PROTECTED] with
"unsubscribe directfb-dev" as subject.