draw: move vertex header init out of fetch_shade_pipeline.c
authorKeith Whitwell <keith@tungstengraphics.com>
Mon, 14 Apr 2008 11:27:25 +0000 (12:27 +0100)
committerKeith Whitwell <keith@tungstengraphics.com>
Mon, 14 Apr 2008 11:27:25 +0000 (12:27 +0100)
src/gallium/auxiliary/draw/draw_pt_fetch_pipeline.c
src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c
src/gallium/auxiliary/draw/draw_vs_exec.c
src/gallium/auxiliary/draw/draw_vs_llvm.c
src/gallium/auxiliary/draw/draw_vs_sse.c

index 4c2a281b295459644890c1afc4caaa5e3982beb6..0914a9044051cbefeb3e84993fe2d2f9768867d0 100644 (file)
@@ -211,7 +211,6 @@ fetch_store_general( struct fetch_pipeline_middle_end *fpme,
 static void fetch_pipeline_prepare( struct draw_pt_middle_end *middle,
                                     unsigned prim )
 {
-   static const float zero = 0;
    struct fetch_pipeline_middle_end *fpme = (struct fetch_pipeline_middle_end *)middle;
    struct draw_context *draw = fpme->draw;
    unsigned i, nr = 0;
@@ -264,7 +263,6 @@ static void fetch_pipeline_run( struct draw_pt_middle_end *middle,
                             unsigned draw_count )
 {
    struct fetch_pipeline_middle_end *fpme = (struct fetch_pipeline_middle_end *)middle;
-   struct draw_context *draw = fpme->draw;
    char *pipeline_verts;
    
    pipeline_verts = MALLOC( fpme->pipeline_vertex_size * 
index e7550fe3289906c1ba0c33148eb401ae81166d4d..fb9b2da5c07438c769933ddde583617396e903de 100644 (file)
@@ -159,15 +159,6 @@ static void fetch_pipeline_run( struct draw_pt_middle_end *middle,
       return;
    }
 
-   /*FIXME: this init phase should go away */
-   for (i = 0; i < fetch_count; ++i) {
-      struct vertex_header *header =
-         (struct vertex_header*)(pipeline_verts + (fpme->pipeline_vertex_size * i));
-      header->clipmask = 0;
-      header->edgeflag = draw_get_edgeflag(draw, i);
-      header->pad = 0;
-      header->vertex_id = UNDEFINED_VERTEX_ID;
-   }
 
    /* Shade
     */
index 6fe4e554d5e700441e5486377f292e14d2df9313..27cf060cc9f3b7768e16498a10bb974a3369ac80 100644 (file)
@@ -135,6 +135,7 @@ vs_exec_run( struct draw_vertex_shader *shader,
             out->clipmask = 0;
          }
          out->edgeflag = 1;
+        out->vertex_id = UNDEFINED_VERTEX_ID;
 
          if (!draw->identity_viewport) {
             /* Viewport mapping */
index 72317c67aec17e09c05317a91d9b901426390253..73076d2467427586cb15e6cd997b22b2298bd25e 100644 (file)
@@ -140,6 +140,7 @@ vs_llvm_run( struct draw_vertex_shader *base,
          vOut[j]->clipmask = 0;
       }
       vOut[j]->edgeflag = 1;
+      vOut[j]->vertex_id = UNDEFINED_VERTEX_ID;
 
       if (!draw->identity_viewport) {
          /* Viewport mapping */
index c877f5ee3ab0353f03e1fa432c9118a8ec3b2074..92b9947e9f05e687bb80e2022585b3bd7155c999 100644 (file)
@@ -158,6 +158,7 @@ vs_sse_run( struct draw_vertex_shader *base,
             out->clipmask = 0;
          }
          out->edgeflag = 1;
+        out->vertex_id = UNDEFINED_VERTEX_ID;
 
          if (!draw->identity_viewport) {
             /* Viewport mapping */