[xserver-commit] xserver/hw/kdrive/ati ati_reg.h,1.2.2.2,1.2.2.3 r128_blendtmp.h,1.1.2.1,1.1.2.2
Eric Anholt
xserver-commit@pdx.freedesktop.org
Sat, 27 Dec 2003 02:46:57 -0800
Committed by: anholt
Update of /cvs/xserver/xserver/hw/kdrive/ati
In directory pdx:/home/anholt/xserver-dri/hw/kdrive/ati
Modified Files:
Tag: dri-0-1-branch
ati_reg.h r128_blendtmp.h
Log Message:
Properly initialize texture registers in Blend. Fixes problems with
blending code such as whiteness in test-render, or no blending at all.
Tested by: andersca
Index: ati_reg.h
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/ati/ati_reg.h,v
retrieving revision 1.2.2.2
retrieving revision 1.2.2.3
diff -u -d -r1.2.2.2 -r1.2.2.3
--- ati_reg.h 23 Dec 2003 22:29:38 -0000 1.2.2.2
+++ ati_reg.h 27 Dec 2003 10:46:55 -0000 1.2.2.3
@@ -93,8 +93,8 @@
# define R128_BM_GLOBAL_FORCE_TO_PCI (1 << 23)
#define R128_REG_GUI_STAT 0x1740
# define R128_GUI_ACTIVE (1 << 31)
-#define R128_REG_TEX_CNTL 0x1800
+#define R128_REG_TEX_CNTL 0x1800
#define R128_REG_SCALE_SRC_HEIGHT_WIDTH 0x1994
#define R128_REG_SCALE_OFFSET_0 0x1998
#define R128_REG_SCALE_PITCH 0x199c
@@ -104,6 +104,7 @@
#define R128_REG_SCALE_VACC 0x19ac
#define R128_REG_SCALE_DST_X_Y 0x19b0
#define R128_REG_SCALE_DST_HEIGHT_WIDTH 0x19b4
+
#define R128_REG_SCALE_3D_CNTL 0x1a00
# define R128_SCALE_DITHER_ERR_DIFF (0 << 1)
# define R128_SCALE_DITHER_TABLE (1 << 1)
@@ -164,8 +165,16 @@
# define R128_TEX_MAP_ALPHA_IN_TEXTURE (1 << 30)
# define R128_TEX_CACHE_LINE_SIZE_8QW (0 << 31)
# define R128_TEX_CACHE_LINE_SIZE_4QW (1 << 31)
+
#define R128_REG_SCALE_3D_DATATYPE 0x1a20
+#define R128_REG_TEX_CNTL_C 0x1c9c
+# define R128_TEX_ALPHA_EN (1 << 9)
+# define R128_TEX_CACHE_FLUSH (1 << 23)
+
+#define R128_REG_PRIM_TEX_CNTL_C 0x1cb0
+#define R128_REG_PRIM_TEXTURE_COMBINE_CNTL_C 0x1cb4
+
#define R128_DATATYPE_C8 2
#define R128_DATATYPE_ARGB_1555 3
#define R128_DATATYPE_RGB_565 4
Index: r128_blendtmp.h
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/ati/Attic/r128_blendtmp.h,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -d -r1.1.2.1 -r1.1.2.2
--- r128_blendtmp.h 23 Dec 2003 22:29:38 -0000 1.1.2.1
+++ r128_blendtmp.h 27 Dec 2003 10:46:55 -0000 1.1.2.2
@@ -64,7 +64,7 @@
!R128GetDatatype(pSrcPicture->format, &srcDatatype))
return FALSE;
- BEGIN(9);
+ BEGIN(11);
OUT_REG(RADEON_REG_DP_GUI_MASTER_CNTL,
(dstDatatype << 8) |
RADEON_GMC_SRC_DATATYPE_COLOR |
@@ -73,6 +73,8 @@
RADEON_GMC_AUX_CLIP_DIS |
(ATIBltRop[3] << 16) |
RADEON_GMC_3D_FCN_EN);
+ OUT_REG(R128_REG_TEX_CNTL_C, R128_TEX_ALPHA_EN | R128_TEX_CACHE_FLUSH);
+ OUT_REG(R128_REG_PRIM_TEXTURE_COMBINE_CNTL_C, 0);
OUT_REG(R128_REG_SCALE_3D_CNTL,
R128_SCALE_3D_SCALE |
R128BlendOp[op] |