r300: Use reg definition when available & add missing reg definition.
authorChristoph Bill <egore@gmx.de>
Thu, 1 Mar 2007 19:45:04 +0000 (20:45 +0100)
committerJerome Glisse <glisse@freedesktop.org>
Thu, 1 Mar 2007 19:45:04 +0000 (20:45 +0100)
src/mesa/drivers/dri/r300/r300_ioctl.c
src/mesa/drivers/dri/r300/r300_reg.h
src/mesa/drivers/dri/r300/radeon_mm.c

index c5ad02604571904e5b55343f53a1b7f282451e46..6fa34ee482a85d8f98dd1a941bf3455bee15a453 100644 (file)
@@ -228,7 +228,7 @@ static void r300EmitClearState(GLcontext * ctx)
        e32(0);
        
        R300_STATECHANGE(r300, unk221C);
-       reg_start(0x221C, 0);
+       reg_start(R300_VAP_UNKNOWN_221C, 0);
        e32(R300_221C_CLEAR);
        
        R300_STATECHANGE(r300, ps);
index 6abcfa456980b5fd07bce103b41eed72d20d6208..9de4c4d68b5fd73dbb3be13ed38da294d32f4ae5 100644 (file)
@@ -63,6 +63,12 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define R300_SE_VPORT_ZOFFSET               0x1DAC
 
 
+/*
+ * Vertex Array Processing (VAP) Control
+ * Stolen from r200 code from Christoph Brill (It's a guess!)
+ */
+#define R300_VAP_CNTL  0x2080
+
 /* This register is written directly and also starts data section
  * in many 3d CP_PACKET3's
  */
@@ -135,7 +141,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 /* gap */
 
-#define R300_VAP_CNTL                     0x2140
+#define R300_VAP_CNTL_STATUS              0x2140
 #      define R300_VC_NO_SWAP                  (0 << 0)
 #      define R300_VC_16BIT_SWAP               (1 << 0)
 #      define R300_VC_32BIT_SWAP               (2 << 0)
index f86a1b4e72e70bc4643cb2267f7e88b64631db70..32ed1f43939e2398671832fde0e8d1aeb8a32265 100644 (file)
@@ -283,7 +283,7 @@ static void emit_lin_cp(r300ContextPtr rmesa, unsigned long dst, unsigned long s
                size -= cp_size;
        }
        
-       reg_start(0x4e4c,0);
+       reg_start(R300_RB3D_DSTCACHE_CTLSTAT,0);
        e32(0x0000000a);
        
        reg_start(0x342c,0);