X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fgallium%2Fauxiliary%2Fdraw%2Fdraw_pipe_flatshade.c;h=693f2895aad9232a21fb7152fb5c1cb0ae0d664f;hb=1d6f3543a063ab9e740fd0c149dcce26c282d773;hp=43d1fecc4dd3d5a71468b1768d98f228ede0322c;hpb=3059ceb7f8128f00846f261f1927f5ec72d5dd15;p=mesa.git diff --git a/src/gallium/auxiliary/draw/draw_pipe_flatshade.c b/src/gallium/auxiliary/draw/draw_pipe_flatshade.c index 43d1fecc4dd..693f2895aad 100644 --- a/src/gallium/auxiliary/draw/draw_pipe_flatshade.c +++ b/src/gallium/auxiliary/draw/draw_pipe_flatshade.c @@ -257,10 +257,8 @@ 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; flatshade->stage.point = draw_pipe_passthrough_point; flatshade->stage.line = flatshade_first_line; @@ -269,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: