Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/rasops rasops: fix automagic box chars for stride > ...
details: https://anonhg.NetBSD.org/src/rev/11b3c8788058
branches: trunk
changeset: 366134:11b3c8788058
user: uwe <uwe%NetBSD.org@localhost>
date: Sun May 15 16:43:39 2022 +0000
description:
rasops: fix automagic box chars for stride > 1 on little endian
This makes DEC line drawing (acsc) work correctly for "iso" fonts of
large sizes, e.g. spleen16x32 on x86.
diffstat:
sys/dev/rasops/rasops.c | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
diffs (50 lines):
diff -r 1a16a69cf38c -r 11b3c8788058 sys/dev/rasops/rasops.c
--- a/sys/dev/rasops/rasops.c Sun May 15 16:38:25 2022 +0000
+++ b/sys/dev/rasops/rasops.c Sun May 15 16:43:39 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rasops.c,v 1.127 2022/05/15 16:12:52 uwe Exp $ */
+/* $NetBSD: rasops.c,v 1.128 2022/05/15 16:43:39 uwe Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.127 2022/05/15 16:12:52 uwe Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.128 2022/05/15 16:43:39 uwe Exp $");
#ifdef _KERNEL_OPT
#include "opt_rasops.h"
@@ -1195,6 +1195,11 @@
vert_mask = 0xc000U >> ((ri->ri_font->fontwidth >> 1) - 1);
hmask_left = 0xff00U << (8 - (ri->ri_font->fontwidth >> 1));
hmask_right = hmask_left >> ((ri->ri_font->fontwidth + 1) >> 1);
+
+ vert_mask = htobe16(vert_mask);
+ hmask_left = htobe16(hmask_left);
+ hmask_right = htobe16(hmask_right);
+
mid = (ri->ri_font->fontheight + 1) >> 1;
/* 0x00 would be empty anyway so don't bother */
@@ -1234,6 +1239,7 @@
vert_mask = 0xc0U >> ((ri->ri_font->fontwidth >> 1) - 1);
hmask_left = 0xf0U << (4 - (ri->ri_font->fontwidth >> 1));
hmask_right = hmask_left >> ((ri->ri_font->fontwidth + 1) >> 1);
+
mid = (ri->ri_font->fontheight + 1) >> 1;
/* 0x00 would be empty anyway so don't bother */
@@ -1273,6 +1279,11 @@
vert_mask = 0xc0000000U >> ((ri->ri_font->fontwidth >> 1) - 1);
hmask_left = 0xffff0000U << (16 - (ri->ri_font->fontwidth >> 1));
hmask_right = hmask_left >> ((ri->ri_font->fontwidth + 1) >> 1);
+
+ vert_mask = htobe32(vert_mask);
+ hmask_left = htobe32(hmask_left);
+ hmask_right = htobe32(hmask_right);
+
mid = (ri->ri_font->fontheight + 1) >> 1;
/* 0x00 would be empty anyway so don't bother */
Home |
Main Index |
Thread Index |
Old Index