Renamed the R300_VAP_UNKNOWN_221C to R300_VAP_CLIP_CNTL.
authorOliver McFadden <z3ro.geek@gmail.com>
Mon, 5 Nov 2007 22:05:16 +0000 (22:05 +0000)
committerOliver McFadden <z3ro.geek@gmail.com>
Mon, 5 Nov 2007 22:17:34 +0000 (22:17 +0000)
src/mesa/drivers/dri/r300/r300_cmdbuf.c
src/mesa/drivers/dri/r300/r300_context.h
src/mesa/drivers/dri/r300/r300_ioctl.c
src/mesa/drivers/dri/r300/r300_reg.h
src/mesa/drivers/dri/r300/r300_state.c

index 203c108012baee89263e45dc030980e803baaac8..f781c5332810475f882f7ca84035c64e7b348f95 100644 (file)
@@ -319,8 +319,8 @@ void r300InitCmdBuf(r300ContextPtr r300)
        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);
index f853d08057332a98c8c804d4f355828fd36ea88e..795cd4d98dfd837dd3e90abb83887d5ee3b439ea 100644 (file)
@@ -458,7 +458,7 @@ struct r300_hw_state {
        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) */
index ceb2e2d43282bea9d55b9130fbaabfe0fe7700c5..d4914c9cb60e424a3efac5914a9b10254c977171 100644 (file)
@@ -261,8 +261,8 @@ static void r300EmitClearState(GLcontext * ctx)
        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);
         }
 
index 2e998bc5fee13b243bab44ffd327f2c5106dc3e9..6ca4257cbdbfa0f0d0f335b5ec07c277183a6565 100644 (file)
@@ -326,8 +326,13 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
 /* 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)
index cd8bcdb47d1a87f8b3860ed434f0c9784d8caed7..9491f98b473f045ccd7051111c32cce0b14a8362 100644 (file)
@@ -1717,13 +1717,13 @@ static void r300Enable(GLcontext * ctx, GLenum cap, GLboolean state)
                        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:
@@ -1842,7 +1842,7 @@ static void r300ResetHwState(r300ContextPtr r300)
 
        /* 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 */