changeset 5044:43dc579db3d1

Fixed color key definitions. Waiting for new bugreports ;)
author nick
date Mon, 11 Mar 2002 08:48:54 +0000
parents 0700ce9958d2
children ccf1be6ccf5e
files vidix/drivers/radeon.h vidix/drivers/radeon_vid.c
diffstat 2 files changed, 12 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/vidix/drivers/radeon.h	Mon Mar 11 08:48:06 2002 +0000
+++ b/vidix/drivers/radeon.h	Mon Mar 11 08:48:54 2002 +0000
@@ -686,16 +686,16 @@
 #define	OV0_GRAPHICS_KEY_CLR			0x04EC
 #define	OV0_GRAPHICS_KEY_MSK			0x04F0
 #define	OV0_KEY_CNTL				0x04F4
-#	define VIDEO_KEY_FN_MASK		0x00000007L
+#	define VIDEO_KEY_FN_MASK		0x00000003L
 #	define VIDEO_KEY_FN_FALSE		0x00000000L
 #	define VIDEO_KEY_FN_TRUE		0x00000001L
-#	define VIDEO_KEY_FN_EQ			0x00000004L
-#	define VIDEO_KEY_FN_NE			0x00000005L
-#	define GRAPHIC_KEY_FN_MASK		0x00000070L
+#	define VIDEO_KEY_FN_EQ			0x00000002L
+#	define VIDEO_KEY_FN_NE			0x00000003L
+#	define GRAPHIC_KEY_FN_MASK		0x00000030L
 #	define GRAPHIC_KEY_FN_FALSE		0x00000000L
 #	define GRAPHIC_KEY_FN_TRUE		0x00000010L
-#	define GRAPHIC_KEY_FN_EQ		0x00000040L
-#	define GRAPHIC_KEY_FN_NE		0x00000050L
+#	define GRAPHIC_KEY_FN_EQ		0x00000020L
+#	define GRAPHIC_KEY_FN_NE		0x00000030L
 #	define CMP_MIX_MASK			0x00000100L
 #	define CMP_MIX_OR			0x00000000L
 #	define CMP_MIX_AND			0x00000100L
--- a/vidix/drivers/radeon_vid.c	Mon Mar 11 08:48:06 2002 +0000
+++ b/vidix/drivers/radeon_vid.c	Mon Mar 11 08:48:54 2002 +0000
@@ -659,7 +659,7 @@
   besr.ckey_on=0;
   besr.graphics_key_msk=0;
   besr.graphics_key_clr=0;
-  besr.ckey_cntl = GRAPHIC_KEY_FN_NE;
+  besr.ckey_cntl = VIDEO_KEY_FN_TRUE|GRAPHIC_KEY_FN_TRUE|CMP_MIX_AND;
 }
 
 
@@ -888,7 +888,7 @@
 		    VID_DEPTH_12BPP| VID_DEPTH_15BPP|
 		    VID_DEPTH_16BPP| VID_DEPTH_24BPP|
 		    VID_DEPTH_32BPP;
-	to->flags = VID_CAP_EXPAND | VID_CAP_SHRINK/* | VID_CAP_COLORKEY*/;
+	to->flags = VID_CAP_EXPAND | VID_CAP_SHRINK | VID_CAP_COLORKEY;
 	return 0;
     }
     else  to->depth = to->flags = 0;
@@ -1483,16 +1483,17 @@
 		besr.graphics_key_msk=0;
 		besr.graphics_key_clr=0;
 	}
-	besr.graphics_key_msk = 0xFF000000|besr.graphics_key_clr;
-	besr.ckey_cntl = 0x20;
+	besr.graphics_key_msk = besr.graphics_key_clr;
+	besr.ckey_cntl = VIDEO_KEY_FN_TRUE|GRAPHIC_KEY_FN_EQ|CMP_MIX_AND;
     }
     else
     {
 	besr.ckey_on=0;
 	besr.graphics_key_msk=0;
 	besr.graphics_key_clr=0;
-	besr.ckey_cntl = GRAPHIC_KEY_FN_NE;
+	besr.ckey_cntl = VIDEO_KEY_FN_TRUE|GRAPHIC_KEY_FN_TRUE|CMP_MIX_AND;
     }
+    radeon_fifo_wait(3);
     OUTREG(OV0_GRAPHICS_KEY_MSK, besr.graphics_key_msk);
     OUTREG(OV0_GRAPHICS_KEY_CLR, besr.graphics_key_clr);
     OUTREG(OV0_KEY_CNTL,besr.ckey_cntl);