i965g: hook vertex state emit up to PIPE_NEW_VERTEX_BUFFER
authorKeith Whitwell <keithw@vmware.com>
Mon, 21 Dec 2009 16:57:37 +0000 (16:57 +0000)
committerKeith Whitwell <keithw@vmware.com>
Mon, 21 Dec 2009 16:57:37 +0000 (16:57 +0000)
src/gallium/drivers/i965/brw_context.h
src/gallium/drivers/i965/brw_draw.c
src/gallium/drivers/i965/brw_draw_upload.c
src/gallium/drivers/i965/brw_state_debug.c

index b7330f00f49e07e41ba77784daf7f37ccd1b0aa3..143e068987c157739ed93403bfa6c847b3881360 100644 (file)
@@ -257,7 +257,7 @@ struct brw_sampler {
 #define BRW_NEW_WM_SURFACES            0x1000
 #define BRW_NEW_xxx                     0x2000 /* was FENCE */
 #define BRW_NEW_INDICES                        0x4000
-#define BRW_NEW_VERTICES               0x8000
+
 /**
  * Used for any batch entry with a relocated pointer that will be used
  * by any 3D rendering.  Need to re-emit these fresh in each
index 45d5ade1fc7017cc1a09b1b4a238dfb88049d26a..4498773dd8681f28381284c4ce72f182b95b492c 100644 (file)
@@ -92,6 +92,10 @@ static int brw_emit_prim(struct brw_context *brw,
    struct brw_3d_primitive prim_packet;
    int ret;
 
+   if (BRW_DEBUG & DEBUG_PRIMS)
+      debug_printf("%s start %d count %d indexed %d hw_prim %d\n",
+                   __FUNCTION__, start, count, indexed, hw_prim); 
+
    prim_packet.header.opcode = CMD_3D_PRIM;
    prim_packet.header.length = sizeof(prim_packet)/4 - 2;
    prim_packet.header.pad = 0;
@@ -187,7 +191,8 @@ brw_draw_range_elements(struct pipe_context *pipe,
    hw_prim = brw_set_prim(brw, mode);
 
    if (BRW_DEBUG & DEBUG_PRIMS)
-      debug_printf("PRIM: %s %d %d\n", u_prim_name(mode), start, count);
+      debug_printf("PRIM: %s start %d count %d index_buffer %p\n",
+                   u_prim_name(mode), start, count, (void *)index_buffer);
 
    /* Potentially trigger upload of new index buffer.
     *
index f50ce3005dadd9c48bd9a1a8b274f97ebc359859..a27da5f1c1713e99284725a0840e4f8197fe1527 100644 (file)
@@ -405,8 +405,9 @@ static int brw_emit_vertices( struct brw_context *brw )
 
 const struct brw_tracked_state brw_vertices = {
    .dirty = {
-      .mesa = PIPE_NEW_INDEX_RANGE,
-      .brw = BRW_NEW_BATCH | BRW_NEW_VERTICES,
+      .mesa = (PIPE_NEW_INDEX_RANGE |
+               PIPE_NEW_VERTEX_BUFFER),
+      .brw = BRW_NEW_BATCH,
       .cache = 0,
    },
    .prepare = brw_prepare_vertices,
index 050f74761cfe6ddeedea6bf20fa672484cfed892..049c278c93e4b802a5fccff004f325508eafed09 100644 (file)
@@ -80,7 +80,6 @@ static struct dirty_bit_map brw_bits[] = {
    DEFINE_BIT(BRW_NEW_WM_SURFACES),
    DEFINE_BIT(BRW_NEW_xxx),
    DEFINE_BIT(BRW_NEW_INDICES),
-   DEFINE_BIT(BRW_NEW_VERTICES),
    {0, 0, 0}
 };