[Mesa-dev] [PATCH] Remove gallium draw_arrays() and draw_arrays_instanced() functions
Alex Deucher
alexdeucher at gmail.com
Thu Jun 6 05:23:53 PDT 2013
On Thu, Jun 6, 2013 at 4:56 AM, Arnas Milasevicius <giant1gf at gmail.com> wrote:
>
> Because draw_arrays() is only sued in state_tracker's st_draw_feedback.c file, I moved it from draw_pt.c to there and mate it static.
A couple of typos:
sued -> used
mate -> made
Also, please try and make your commit messages wrap at 80 characters
or less. One more comment below.
> ---
> v2: removed draw_arrays_instanced() function and modified draw_arrays()
> src/mesa/state_tracker/st_draw_feedback.c | 26 +++++++-------------------
> 1 file changed, 7 insertions(+), 19 deletions(-)
>
> diff --git a/src/mesa/state_tracker/st_draw_feedback.c b/src/mesa/state_tracker/st_draw_feedback.c
> index 56e3018..6bc0383 100644
> --- a/src/mesa/state_tracker/st_draw_feedback.c
> +++ b/src/mesa/state_tracker/st_draw_feedback.c
> @@ -86,12 +86,12 @@ set_feedback_vertex_format(struct gl_context *ctx)
> * \sa draw_vbo
> */
> static void
> -draw_arrays_instanced(struct draw_context *draw,
> - unsigned mode,
> - unsigned start,
> - unsigned count,
> - unsigned startInstance,
> - unsigned instanceCount)
> +draw_arrays(struct draw_context *draw,
> + unsigned mode,
> + unsigned start,
> + unsigned count,
> + unsigned startInstance,
> + unsigned instanceCount)
Please drop the whitespace changes.
> {
> struct pipe_draw_info info;
>
> @@ -110,18 +110,6 @@ draw_arrays_instanced(struct draw_context *draw,
>
>
> /**
> - * Non-instanced drawing.
> - * \sa draw_arrays_instanced
> - */
> -static void
> -draw_arrays(struct draw_context *draw, unsigned prim,
> - unsigned start, unsigned count)
> -{
> - draw_arrays_instanced(draw, prim, start, count, 0, 1);
> -}
> -
> -
> -/**
> * Called by VBO to draw arrays when in selection or feedback mode and
> * to implement glRasterPos.
> * This is very much like the normal draw_vbo() function above.
> @@ -285,7 +273,7 @@ st_feedback_draw_vbo(struct gl_context *ctx,
>
> /* draw here */
> for (i = 0; i < nr_prims; i++) {
> - draw_arrays(draw, prims[i].mode, prims[i].start, prims[i].count);
> + draw_arrays(draw, prims[i].mode, prims[i].start, prims[i].count, 0, 1);
> }
>
>
> --
> 1.8.3
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list