Module Name: src Committed By: rin Date: Fri Aug 2 04:35:54 UTC 2019
Modified Files: src/sys/dev/rasops: rasops_bitops.h Log Message: Fix a bug in shadow fb support for copycols on 1, 2, and 4bpp screen, which was introduced in 1.18: http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/rasops/rasops_bitops.h#rev1.18 To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/dev/rasops/rasops_bitops.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/rasops/rasops_bitops.h diff -u src/sys/dev/rasops/rasops_bitops.h:1.21 src/sys/dev/rasops/rasops_bitops.h:1.22 --- src/sys/dev/rasops/rasops_bitops.h:1.21 Fri Aug 2 04:31:54 2019 +++ src/sys/dev/rasops/rasops_bitops.h Fri Aug 2 04:35:54 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: rasops_bitops.h,v 1.21 2019/08/02 04:31:54 rin Exp $ */ +/* $NetBSD: rasops_bitops.h,v 1.22 2019/08/02 04:35:54 rin Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -298,8 +298,6 @@ NAME(copycols)(void *cookie, int row, in while (height--) { sp = srp; dp = drp; - DELTA(srp, ri->ri_stride, uint32_t *); - DELTA(drp, ri->ri_stride, uint32_t *); if (rnum) { GETBITS(sp, sboff, rnum, tmp); @@ -324,11 +322,14 @@ NAME(copycols)(void *cookie, int row, in if (ri->ri_hwbits) { hp = dhp; - hp -= full + (lmask != 0); - memcpy(hp, dp, ((rmask != 0) + cnt + - (lmask != 0)) << 2); + hp -= (lmask != 0) + full; + memcpy(hp, dp, ((lmask != 0) + full + + (rnum != 0)) << 2); DELTA(dhp, ri->ri_stride, uint32_t *); } + + DELTA(srp, ri->ri_stride, uint32_t *); + DELTA(drp, ri->ri_stride, uint32_t *); } } else { /* Copy left-to-right */