tgsi/ureg: make the dst register match the src indirection
[mesa.git] / src / gallium / auxiliary / draw / draw_pipe_flatshade.c
index 34afb1a0b609bdb82a18fd6af9d269190bf6c0df..693f2895aad9232a21fb7152fb5c1cb0ae0d664f 100644 (file)
@@ -257,9 +257,6 @@ struct draw_stage *draw_flatshade_stage( struct draw_context *draw )
    if (flatshade == NULL)
       goto fail;
 
-   if (!draw_alloc_temp_verts( &flatshade->stage, 2 ))
-      goto fail;
-
    flatshade->stage.draw = draw;
    flatshade->stage.name = "flatshade";
    flatshade->stage.next = NULL;
@@ -270,6 +267,9 @@ struct draw_stage *draw_flatshade_stage( struct draw_context *draw )
    flatshade->stage.reset_stipple_counter = flatshade_reset_stipple_counter;
    flatshade->stage.destroy = flatshade_destroy;
 
+   if (!draw_alloc_temp_verts( &flatshade->stage, 2 ))
+      goto fail;
+
    return &flatshade->stage;
 
  fail: