r300: remove the unknowns from the indx_buffer code
authorDave Airlie <airlied@linux.ie>
Sun, 28 Dec 2008 06:48:36 +0000 (16:48 +1000)
committerDave Airlie <airlied@linux.ie>
Sun, 28 Dec 2008 06:48:36 +0000 (16:48 +1000)
src/mesa/drivers/dri/r300/r300_reg.h
src/mesa/drivers/dri/r300/r300_render.c

index 778db96cc1fd184f6afd1653018f5a6cce23b5fd..7c6485ef60bc25b2630d31b3c36fb828e838376c 100644 (file)
@@ -64,7 +64,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define R300_SE_VPORT_ZSCALE                0x1DA8
 #define R300_SE_VPORT_ZOFFSET               0x1DAC
 
-
+#define R300_VAP_PORT_IDX0                 0x2040
 /*
  * Vertex Array Processing (VAP) Control
  */
@@ -3201,9 +3201,9 @@ enum {
 #define R300_PACKET3_3D_LOAD_VBPNTR         0x00002F00
 
 #define R300_PACKET3_INDX_BUFFER            0x00003300
-#    define R300_EB_UNK1_SHIFT                      24
-#    define R300_EB_UNK1                    (0x80<<24)
-#    define R300_EB_UNK2                        0x0810
+#    define R300_INDX_BUFFER_DST_SHIFT          0
+#    define R300_INDX_BUFFER_SKIP_SHIFT         16
+#    define R300_INDX_BUFFER_ONE_REG_WR                (1<<31)
 
 /* Same as R300_PACKET3_3D_DRAW_VBUF but without VAP_VTX_FMT */
 #define R300_PACKET3_3D_DRAW_VBUF_2         0x00003400
index 292f87a2b1b5c3b19f755a31eddb023242939efe..3a29b4d2880f31f3e606b5626e3219732b3a0085 100644 (file)
@@ -208,7 +208,8 @@ static void r300FireEB(r300ContextPtr rmesa, unsigned long addr,
        e32(R300_VAP_VF_CNTL__PRIM_WALK_INDICES | (vertex_count << 16) | type | R300_VAP_VF_CNTL__INDEX_SIZE_32bit);
 
        start_packet3(CP_PACKET3(R300_PACKET3_INDX_BUFFER, 2), 2);
-       e32(R300_EB_UNK1 | (0 << 16) | R300_EB_UNK2);
+       e32(R300_INDX_BUFFER_ONE_REG_WR | (0 << R300_INDX_BUFFER_SKIP_SHIFT) |
+           (R300_VAP_PORT_IDX0 >> 2))
        e32(addr);
        e32(vertex_count);
 }