r300->hw.unk21DC.cmd[0] = cmdpacket0(0x21DC, 1);
if (has_tcl) {
- ALLOC_STATE(unk221C, always, 2, 0);
- r300->hw.unk221C.cmd[0] = cmdpacket0(R300_VAP_UNKNOWN_221C, 1);
+ ALLOC_STATE(vap_clip_cntl, always, 2, 0);
+ r300->hw.vap_clip_cntl.cmd[0] = cmdpacket0(R300_VAP_CLIP_CNTL, 1);
ALLOC_STATE(vap_clip, always, 5, 0);
r300->hw.vap_clip.cmd[0] = cmdpacket0(R300_VAP_CLIP_X_0, 4);
ALLOC_STATE(unk2288, always, 2, 0);
struct r300_state_atom vir[2]; /* vap input route (2150/21E0) */
struct r300_state_atom vic; /* vap input control (2180) */
struct r300_state_atom unk21DC; /* (21DC) */
- struct r300_state_atom unk221C; /* (221C) */
+ struct r300_state_atom vap_clip_cntl;
struct r300_state_atom vap_clip;
struct r300_state_atom unk2288; /* (2288) */
struct r300_state_atom pvs; /* pvs_cntl (22D0) */
e32(0x0);
if (has_tcl) {
- R300_STATECHANGE(r300, unk221C);
- reg_start(R300_VAP_UNKNOWN_221C, 0);
+ R300_STATECHANGE(r300, vap_clip_cntl);
+ reg_start(R300_VAP_CLIP_CNTL, 0);
e32(R300_221C_CLEAR);
}
/* I do not know the purpose of this register. However, I do know that
* it is set to 221C_CLEAR for clear operations and to 221C_NORMAL
* for normal rendering.
+ *
+ * 2007-11-05: This register is the user clip plane control register, but there
+ * also seems to be a rendering mode control; the NORMAL/CLEAR defines.
+ *
+ * See bug #9871. http://bugs.freedesktop.org/attachment.cgi?id=10672&action=view
*/
-#define R300_VAP_UNKNOWN_221C 0x221C
+#define R300_VAP_CLIP_CNTL 0x221C
# define R300_221C_NORMAL 0x00000000
# define R300_221C_CLEAR 0x0001C000
#define R300_VAP_UCP_ENABLE_0 (1 << 0)
return;
p = cap-GL_CLIP_PLANE0;
- R300_STATECHANGE( r300, unk221C );
+ R300_STATECHANGE( r300, vap_clip_cntl );
if (state) {
- r300->hw.unk221C.cmd[1] |= (R300_VAP_UCP_ENABLE_0<<p);
+ r300->hw.vap_clip_cntl.cmd[1] |= (R300_VAP_UCP_ENABLE_0<<p);
r300ClipPlane( ctx, cap, NULL );
}
else {
- r300->hw.unk221C.cmd[1] &= ~(R300_VAP_UCP_ENABLE_0<<p);
+ r300->hw.vap_clip_cntl.cmd[1] &= ~(R300_VAP_UCP_ENABLE_0<<p);
}
break;
case GL_DEPTH_TEST:
/* XXX: Other families? */
if (has_tcl) {
- r300->hw.unk221C.cmd[1] = R300_221C_NORMAL;
+ r300->hw.vap_clip_cntl.cmd[1] = R300_221C_NORMAL;
r300->hw.vap_clip.cmd[1] = r300PackFloat32(1.0); /* X */
r300->hw.vap_clip.cmd[2] = r300PackFloat32(1.0); /* X */