summaryrefslogtreecommitdiff
path: root/sys/dev/rasops/rasops.c
diff options
context:
space:
mode:
authormacallan <macallan@NetBSD.org>2012-01-04 20:17:05 +0000
committermacallan <macallan@NetBSD.org>2012-01-04 20:17:05 +0000
commit3bf43dcbac829cc044d5bc3fc1f49a3becaeb0da (patch)
treef019594e9258d885bf77a5334bece45271ab399c /sys/dev/rasops/rasops.c
parentcf2bdc4c0732a98355d96a0652ef92ca92423cdd (diff)
rasops8 expects the colour value replicated in every byte in devcmap[], so
fix that for r3g3b2
Diffstat (limited to 'sys/dev/rasops/rasops.c')
-rw-r--r--sys/dev/rasops/rasops.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/dev/rasops/rasops.c b/sys/dev/rasops/rasops.c
index d790be2e2e2..90d2012cf46 100644
--- a/sys/dev/rasops/rasops.c
+++ b/sys/dev/rasops/rasops.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rasops.c,v 1.68 2011/12/28 08:36:46 macallan Exp $ */
+/* $NetBSD: rasops.c,v 1.69 2012/01/04 20:17:05 macallan Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.68 2011/12/28 08:36:46 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.69 2012/01/04 20:17:05 macallan Exp $");
#include "opt_rasops.h"
#include "rasops_glue.h"
@@ -841,7 +841,10 @@ rasops_init_devcmap(struct rasops_info *ri)
/* Fill the word for generic routines, which want this */
if (ri->ri_depth == 24)
c = c | ((c & 0xff) << 24);
- else if (ri->ri_depth <= 16)
+ else if (ri->ri_depth == 8) {
+ c = c | (c << 8);
+ c |= c << 16;
+ } else if (ri->ri_depth <= 16)
c = c | (c << 16);
/* 24bpp does bswap on the fly. {32,16,15}bpp do it here. */