Subject: kern/6786: conditionalize 2bpp display code
To: None <gnats-bugs@gnats.netbsd.org>
From: None <deberg@MIT.EDU>
List: netbsd-bugs
Date: 01/11/1999 02:22:43
>Number:         6786
>Category:       kern
>Synopsis:       this patch makes the 2bpp rcons code conditional
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sun Jan 10 23:35:01 1999
>Last-Modified:
>Originator:     matt debergalis
>Organization:
matt debergalis <deberg@mit.edu> KB1CTH
finger deberg@ai.mit.edu for PGP key
>Release:        1.3I 19990111
>Environment:
System: NetBSD sunrise.ne.mediaone.net 1.3I NetBSD 1.3I (SUNRISE) #2: Tue Dec 29 14:21:21 EST 1998 deberg@sunrise.ne.mediaone.net:/src/netbsd/src/sys/arch/i386/compile/SUNRISE i386

>Description:
        kern/6741 supplies extensions to rcons for 2bpp displays.  the
        following patch conditionalizes the added code on
        RCONS_2BPP.  (assumes kern/6741 already applied.)
>How-To-Repeat:
>Fix:

Index: /src/netbsd/src/sys/dev/rcons/raster_op.c
===================================================================
RCS file: /src/cvsroot-netbsd/netbsd/src/sys/dev/rcons/raster_op.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- raster_op.c	1999/01/06 08:06:24	1.2
+++ raster_op.c	1999/01/11 07:00:57	1.3
@@ -496,18 +496,22 @@
 
 #ifdef MSBYTE_FIRST
 static u_int32_t bytemask[4] = { 0xff000000, 0x00ff0000, 0x0000ff00, 0x000000ff };
+#ifdef RCONS_2BPP
 static u_int32_t twobitmask[16] = {
   0xc0000000, 0x30000000, 0x0c000000, 0x03000000,
   0x00c00000, 0x00300000, 0x000c0000, 0x00030000,
   0x0000c000, 0x00003000, 0x00000c00, 0x00000300,
   0x000000c0, 0x00000030, 0x0000000c, 0x00000003 };
+#endif /* RCONS_2BPP */
 #else /*MSBYTE_FIRST*/
 static u_int32_t bytemask[4] = { 0x000000ff, 0x0000ff00, 0x00ff0000, 0xff000000 };
+#ifdef RCONS_2BPP
 static u_int32_t twobitmask[16] = {
   0x00000003, 0x0000000c, 0x00000030, 0x000000c0 };
   0x00000300, 0x00000c00, 0x00003000, 0x0000c000,
   0x00030000, 0x000c0000, 0x00300000, 0x00c00000,
   0x03000000, 0x0c000000, 0x30000000, 0xc0000000,
+#endif /* RCONS_2BPP */
 #endif /*MSBYTE_FIRST*/
 
 
@@ -654,6 +658,7 @@
 		dst, dstlin1, dstleftignore, dstrightignore, dstlongs, h, op );
 	    }
 
+#ifdef RCONS_2BPP
 	else if ( dst->depth == 2 )
           {
             /* One to two, using the color in the rop.  */
@@ -725,7 +730,7 @@
 		dstlin += dst->linelongs;
 		}
           }
-
+#endif /* RCONS_2BPP */
 	else
 	    {
 	    /* One to eight, using the color in the rop.  This could
@@ -797,7 +802,7 @@
 		}
 	    }
 	}
-
+#ifdef RCONS_2BPP
     else if ( src->depth == 2 ) 
       {
         /* Two to two blit. */
@@ -820,7 +825,7 @@
 		src, srclin1, srcleftignore, srcrightignore, srclongs,
 		dst, dstlin1, dstleftignore, dstrightignore, dstlongs, h, op );
 	    }
-        
+#endif /* RCONS_2BPP */
 
     else
 	{
@@ -968,6 +973,7 @@
 	    }
 	}
 
+#ifdef RCONS_2BPP
     else if ( dst->depth == 2 ) 
 	{
 	/* Two-bit no-src blit. */
@@ -1073,7 +1079,7 @@
 		}
 	    }
 	}
-
+#endif /* RCONS_2BPP */
     else
 	{
 	/* Eight-bit no-src blit. */
>Audit-Trail:
>Unformatted: