Module Name: xsrc Committed By: macallan Date: Fri Dec 3 06:10:07 UTC 2021
Modified Files: xsrc/external/mit/xf86-video-suncg14/dist/src: cg14_accel.c Log Message: draw very narrow rectangles correctly To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 \ xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_accel.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_accel.c diff -u xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_accel.c:1.16 xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_accel.c:1.17 --- xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_accel.c:1.16 Thu Dec 2 22:35:26 2021 +++ xsrc/external/mit/xf86-video-suncg14/dist/src/cg14_accel.c Fri Dec 3 06:10:07 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: cg14_accel.c,v 1.16 2021/12/02 22:35:26 macallan Exp $ */ +/* $NetBSD: cg14_accel.c,v 1.17 2021/12/03 06:10:07 macallan Exp $ */ /* * Copyright (c) 2013 Michael Lorenz * All rights reserved. @@ -594,10 +594,12 @@ CG14Solid8(Cg14Ptr p, uint32_t start, ui for (line = 0; line < h; line++) { ptr = start; cnt = w; + pre = min(pre, cnt); if (pre) { write_sx_io(p, ptr & ~7, SX_STBS(8, pre - 1, ptr & 7)); ptr += pre; cnt -= pre; + if (cnt == 0) goto next; } /* now do the aligned pixels in 32bit chunks */ if (ptr & 3) xf86Msg(X_ERROR, "%s %x\n", __func__, ptr); @@ -612,6 +614,7 @@ CG14Solid8(Cg14Ptr p, uint32_t start, ui write_sx_io(p, ptr & ~7, SX_STBS(8, cnt - 1, ptr & 7)); } if ((ptr + cnt) != (start + w)) xf86Msg(X_ERROR, "%s %x vs %x\n", __func__, ptr + cnt, start + w); +next: start += pitch; } } else if (p->last_rop == 0xaa) {