From 807cbb9023a6baf9733026cfb893be202f116269 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 20 Jan 2014 11:00:32 -0800 Subject: draw: whitespace and formatting fixes in draw_pt_fetch_shade_pipeline*.c Trivial. --- .../auxiliary/draw/draw_pt_fetch_shade_pipeline.c | 112 ++++++++++++--------- 1 file changed, 65 insertions(+), 47 deletions(-) (limited to 'src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c') diff --git a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c index 586d69664fe..a21373baa68 100644 --- a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c +++ b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c @@ -58,18 +58,19 @@ struct fetch_pipeline_middle_end { * NOTE: if you change this function, also look at the LLVM * function llvm_middle_end_prepare() for similar changes. */ -static void fetch_pipeline_prepare( struct draw_pt_middle_end *middle, - unsigned prim, - unsigned opt, - unsigned *max_vertices ) +static void +fetch_pipeline_prepare(struct draw_pt_middle_end *middle, + unsigned prim, + unsigned opt, + unsigned *max_vertices) { - struct fetch_pipeline_middle_end *fpme = (struct fetch_pipeline_middle_end *)middle; + struct fetch_pipeline_middle_end *fpme = + (struct fetch_pipeline_middle_end *)middle; struct draw_context *draw = fpme->draw; struct draw_vertex_shader *vs = draw->vs.vertex_shader; struct draw_geometry_shader *gs = draw->gs.geometry_shader; unsigned i; unsigned instance_id_index = ~0; - const unsigned gs_out_prim = (gs ? gs->output_primitive : u_assembled_prim(prim)); unsigned nr_vs_outputs = draw_total_vs_outputs(draw); @@ -95,12 +96,11 @@ static void fetch_pipeline_prepare( struct draw_pt_middle_end *middle, /* Always leave room for the vertex header whether we need it or * not. It's hard to get rid of it in particular because of the - * viewport code in draw_pt_post_vs.c. + * viewport code in draw_pt_post_vs.c. */ fpme->vertex_size = sizeof(struct vertex_header) + nr * 4 * sizeof(float); - - draw_pt_fetch_prepare( fpme->fetch, + draw_pt_fetch_prepare( fpme->fetch, vs->info.num_inputs, fpme->vertex_size, instance_id_index ); @@ -179,9 +179,11 @@ static void pipeline(struct fetch_pipeline_middle_end *fpme, prim_info ); } -static void emit(struct pt_emit *emit, - const struct draw_vertex_info *vert_info, - const struct draw_prim_info *prim_info) + +static void +emit(struct pt_emit *emit, + const struct draw_vertex_info *vert_info, + const struct draw_prim_info *prim_info) { if (prim_info->linear) { draw_pt_emit_linear(emit, vert_info, prim_info); @@ -192,11 +194,12 @@ static void emit(struct pt_emit *emit, } -static void draw_vertex_shader_run(struct draw_vertex_shader *vshader, - const void *constants[PIPE_MAX_CONSTANT_BUFFERS], - unsigned const_size[PIPE_MAX_CONSTANT_BUFFERS], - const struct draw_vertex_info *input_verts, - struct draw_vertex_info *output_verts ) +static void +draw_vertex_shader_run(struct draw_vertex_shader *vshader, + const void *constants[PIPE_MAX_CONSTANT_BUFFERS], + unsigned const_size[PIPE_MAX_CONSTANT_BUFFERS], + const struct draw_vertex_info *input_verts, + struct draw_vertex_info *output_verts) { output_verts->vertex_size = input_verts->vertex_size; output_verts->stride = input_verts->vertex_size; @@ -215,11 +218,14 @@ static void draw_vertex_shader_run(struct draw_vertex_shader *vshader, input_verts->vertex_size); } -static void fetch_pipeline_generic( struct draw_pt_middle_end *middle, - const struct draw_fetch_info *fetch_info, - const struct draw_prim_info *in_prim_info ) + +static void +fetch_pipeline_generic(struct draw_pt_middle_end *middle, + const struct draw_fetch_info *fetch_info, + const struct draw_prim_info *in_prim_info) { - struct fetch_pipeline_middle_end *fpme = (struct fetch_pipeline_middle_end *)middle; + struct fetch_pipeline_middle_end *fpme = + (struct fetch_pipeline_middle_end *) middle; struct draw_context *draw = fpme->draw; struct draw_vertex_shader *vshader = draw->vs.vertex_shader; struct draw_geometry_shader *gshader = draw->gs.geometry_shader; @@ -302,7 +308,7 @@ static void fetch_pipeline_generic( struct draw_pt_middle_end *middle, } if (prim_info->count == 0) { debug_printf("GS/IA didn't emit any vertices!\n"); - + FREE(vert_info->verts); if (free_prim_info) { FREE(prim_info->primitive_lengths); @@ -346,14 +352,17 @@ static void fetch_pipeline_generic( struct draw_pt_middle_end *middle, } } -static void fetch_pipeline_run( struct draw_pt_middle_end *middle, - const unsigned *fetch_elts, - unsigned fetch_count, - const ushort *draw_elts, - unsigned draw_count, - unsigned prim_flags ) + +static void +fetch_pipeline_run(struct draw_pt_middle_end *middle, + const unsigned *fetch_elts, + unsigned fetch_count, + const ushort *draw_elts, + unsigned draw_count, + unsigned prim_flags) { - struct fetch_pipeline_middle_end *fpme = (struct fetch_pipeline_middle_end *)middle; + struct fetch_pipeline_middle_end *fpme = + (struct fetch_pipeline_middle_end *) middle; struct draw_fetch_info fetch_info; struct draw_prim_info prim_info; @@ -375,12 +384,14 @@ static void fetch_pipeline_run( struct draw_pt_middle_end *middle, } -static void fetch_pipeline_linear_run( struct draw_pt_middle_end *middle, - unsigned start, - unsigned count, - unsigned prim_flags) +static void +fetch_pipeline_linear_run(struct draw_pt_middle_end *middle, + unsigned start, + unsigned count, + unsigned prim_flags) { - struct fetch_pipeline_middle_end *fpme = (struct fetch_pipeline_middle_end *)middle; + struct fetch_pipeline_middle_end *fpme = + (struct fetch_pipeline_middle_end *) middle; struct draw_fetch_info fetch_info; struct draw_prim_info prim_info; @@ -403,14 +414,16 @@ static void fetch_pipeline_linear_run( struct draw_pt_middle_end *middle, -static boolean fetch_pipeline_linear_run_elts( struct draw_pt_middle_end *middle, - unsigned start, - unsigned count, - const ushort *draw_elts, - unsigned draw_count, - unsigned prim_flags ) +static boolean +fetch_pipeline_linear_run_elts(struct draw_pt_middle_end *middle, + unsigned start, + unsigned count, + const ushort *draw_elts, + unsigned draw_count, + unsigned prim_flags ) { - struct fetch_pipeline_middle_end *fpme = (struct fetch_pipeline_middle_end *)middle; + struct fetch_pipeline_middle_end *fpme = + (struct fetch_pipeline_middle_end *) middle; struct draw_fetch_info fetch_info; struct draw_prim_info prim_info; @@ -434,15 +447,18 @@ static boolean fetch_pipeline_linear_run_elts( struct draw_pt_middle_end *middle } - -static void fetch_pipeline_finish( struct draw_pt_middle_end *middle ) +static void +fetch_pipeline_finish( struct draw_pt_middle_end *middle ) { /* nothing to do */ } -static void fetch_pipeline_destroy( struct draw_pt_middle_end *middle ) + +static void +fetch_pipeline_destroy( struct draw_pt_middle_end *middle ) { - struct fetch_pipeline_middle_end *fpme = (struct fetch_pipeline_middle_end *)middle; + struct fetch_pipeline_middle_end *fpme = + (struct fetch_pipeline_middle_end *) middle; if (fpme->fetch) draw_pt_fetch_destroy( fpme->fetch ); @@ -460,9 +476,11 @@ static void fetch_pipeline_destroy( struct draw_pt_middle_end *middle ) } -struct draw_pt_middle_end *draw_pt_fetch_pipeline_or_emit( struct draw_context *draw ) +struct draw_pt_middle_end * +draw_pt_fetch_pipeline_or_emit(struct draw_context *draw) { - struct fetch_pipeline_middle_end *fpme = CALLOC_STRUCT( fetch_pipeline_middle_end ); + struct fetch_pipeline_middle_end *fpme = + CALLOC_STRUCT( fetch_pipeline_middle_end ); if (!fpme) goto fail; -- cgit v1.2.3