diff options
author | Brian Paul <[email protected]> | 2009-08-18 16:55:24 -0600 |
---|---|---|
committer | José Fonseca <[email protected]> | 2009-08-29 09:21:35 +0100 |
commit | 908d8d7a1b01214116e358d7641cc097212aeb50 (patch) | |
tree | ab377bf2889446738698a1f12302e2500756ff05 | |
parent | 1ea1cd8468e51a45b1d3c3cac5e4fc6fefa183ba (diff) |
llvmpipe: prefix point/line/tri_setup() functions with llvmpipe_
Avoid symbol collisions with softpipe.
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_prim_setup.c | 12 | ||||
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_prim_vbuf.c | 82 | ||||
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_setup.c | 12 | ||||
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_setup.h | 12 |
4 files changed, 59 insertions, 59 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_prim_setup.c b/src/gallium/drivers/llvmpipe/lp_prim_setup.c index 5a5a6175005..b14f8fb99d9 100644 --- a/src/gallium/drivers/llvmpipe/lp_prim_setup.c +++ b/src/gallium/drivers/llvmpipe/lp_prim_setup.c @@ -71,7 +71,7 @@ do_tri(struct draw_stage *stage, struct prim_header *prim) { struct setup_stage *setup = setup_stage( stage ); - setup_tri( setup->setup, + llvmpipe_setup_tri( setup->setup, (cptrf4)prim->v[0]->data, (cptrf4)prim->v[1]->data, (cptrf4)prim->v[2]->data ); @@ -82,7 +82,7 @@ do_line(struct draw_stage *stage, struct prim_header *prim) { struct setup_stage *setup = setup_stage( stage ); - setup_line( setup->setup, + llvmpipe_setup_line( setup->setup, (cptrf4)prim->v[0]->data, (cptrf4)prim->v[1]->data ); } @@ -92,7 +92,7 @@ do_point(struct draw_stage *stage, struct prim_header *prim) { struct setup_stage *setup = setup_stage( stage ); - setup_point( setup->setup, + llvmpipe_setup_point( setup->setup, (cptrf4)prim->v[0]->data ); } @@ -103,7 +103,7 @@ static void setup_begin( struct draw_stage *stage ) { struct setup_stage *setup = setup_stage(stage); - setup_prepare( setup->setup ); + llvmpipe_setup_prepare( setup->setup ); stage->point = do_point; stage->line = do_line; @@ -152,7 +152,7 @@ static void reset_stipple_counter( struct draw_stage *stage ) static void render_destroy( struct draw_stage *stage ) { struct setup_stage *ssetup = setup_stage(stage); - setup_destroy_context(ssetup->setup); + llvmpipe_setup_destroy_context(ssetup->setup); FREE( stage ); } @@ -164,7 +164,7 @@ struct draw_stage *lp_draw_render_stage( struct llvmpipe_context *llvmpipe ) { struct setup_stage *sstage = CALLOC_STRUCT(setup_stage); - sstage->setup = setup_create_context(llvmpipe); + sstage->setup = llvmpipe_setup_create_context(llvmpipe); sstage->stage.draw = llvmpipe->draw; sstage->stage.point = setup_first_point; sstage->stage.line = setup_first_line; diff --git a/src/gallium/drivers/llvmpipe/lp_prim_vbuf.c b/src/gallium/drivers/llvmpipe/lp_prim_vbuf.c index 15795b9a077..7b0b98a8532 100644 --- a/src/gallium/drivers/llvmpipe/lp_prim_vbuf.c +++ b/src/gallium/drivers/llvmpipe/lp_prim_vbuf.c @@ -166,7 +166,7 @@ lp_vbuf_set_primitive(struct vbuf_render *vbr, unsigned prim) */ struct setup_context *setup_ctx = lp_draw_setup_context(cvbr->llvmpipe->setup); - setup_prepare( setup_ctx ); + llvmpipe_setup_prepare( setup_ctx ); cvbr->llvmpipe->reduced_prim = u_reduced_prim(prim); cvbr->prim = prim; @@ -204,14 +204,14 @@ lp_vbuf_draw(struct vbuf_render *vbr, const ushort *indices, uint nr) switch (cvbr->prim) { case PIPE_PRIM_POINTS: for (i = 0; i < nr; i++) { - setup_point( setup_ctx, + llvmpipe_setup_point( setup_ctx, get_vert(vertex_buffer, indices[i-0], stride) ); } break; case PIPE_PRIM_LINES: for (i = 1; i < nr; i += 2) { - setup_line( setup_ctx, + llvmpipe_setup_line( setup_ctx, get_vert(vertex_buffer, indices[i-1], stride), get_vert(vertex_buffer, indices[i-0], stride) ); } @@ -219,7 +219,7 @@ lp_vbuf_draw(struct vbuf_render *vbr, const ushort *indices, uint nr) case PIPE_PRIM_LINE_STRIP: for (i = 1; i < nr; i ++) { - setup_line( setup_ctx, + llvmpipe_setup_line( setup_ctx, get_vert(vertex_buffer, indices[i-1], stride), get_vert(vertex_buffer, indices[i-0], stride) ); } @@ -227,12 +227,12 @@ lp_vbuf_draw(struct vbuf_render *vbr, const ushort *indices, uint nr) case PIPE_PRIM_LINE_LOOP: for (i = 1; i < nr; i ++) { - setup_line( setup_ctx, + llvmpipe_setup_line( setup_ctx, get_vert(vertex_buffer, indices[i-1], stride), get_vert(vertex_buffer, indices[i-0], stride) ); } if (nr) { - setup_line( setup_ctx, + llvmpipe_setup_line( setup_ctx, get_vert(vertex_buffer, indices[nr-1], stride), get_vert(vertex_buffer, indices[0], stride) ); } @@ -241,13 +241,13 @@ lp_vbuf_draw(struct vbuf_render *vbr, const ushort *indices, uint nr) case PIPE_PRIM_TRIANGLES: for (i = 2; i < nr; i += 3) { if (llvmpipe->rasterizer->flatshade_first) { - setup_tri( setup_ctx, + llvmpipe_setup_tri( setup_ctx, get_vert(vertex_buffer, indices[i-1], stride), get_vert(vertex_buffer, indices[i-0], stride), get_vert(vertex_buffer, indices[i-2], stride) ); } else { - setup_tri( setup_ctx, + llvmpipe_setup_tri( setup_ctx, get_vert(vertex_buffer, indices[i-2], stride), get_vert(vertex_buffer, indices[i-1], stride), get_vert(vertex_buffer, indices[i-0], stride) ); @@ -258,13 +258,13 @@ lp_vbuf_draw(struct vbuf_render *vbr, const ushort *indices, uint nr) case PIPE_PRIM_TRIANGLE_STRIP: for (i = 2; i < nr; i += 1) { if (llvmpipe->rasterizer->flatshade_first) { - setup_tri( setup_ctx, + llvmpipe_setup_tri( setup_ctx, get_vert(vertex_buffer, indices[i+(i&1)-1], stride), get_vert(vertex_buffer, indices[i-(i&1)], stride), get_vert(vertex_buffer, indices[i-2], stride) ); } else { - setup_tri( setup_ctx, + llvmpipe_setup_tri( setup_ctx, get_vert(vertex_buffer, indices[i+(i&1)-2], stride), get_vert(vertex_buffer, indices[i-(i&1)-1], stride), get_vert(vertex_buffer, indices[i-0], stride) ); @@ -275,13 +275,13 @@ lp_vbuf_draw(struct vbuf_render *vbr, const ushort *indices, uint nr) case PIPE_PRIM_TRIANGLE_FAN: for (i = 2; i < nr; i += 1) { if (llvmpipe->rasterizer->flatshade_first) { - setup_tri( setup_ctx, + llvmpipe_setup_tri( setup_ctx, get_vert(vertex_buffer, indices[i-0], stride), get_vert(vertex_buffer, indices[0], stride), get_vert(vertex_buffer, indices[i-1], stride) ); } else { - setup_tri( setup_ctx, + llvmpipe_setup_tri( setup_ctx, get_vert(vertex_buffer, indices[0], stride), get_vert(vertex_buffer, indices[i-1], stride), get_vert(vertex_buffer, indices[i-0], stride) ); @@ -292,22 +292,22 @@ lp_vbuf_draw(struct vbuf_render *vbr, const ushort *indices, uint nr) case PIPE_PRIM_QUADS: for (i = 3; i < nr; i += 4) { if (llvmpipe->rasterizer->flatshade_first) { - setup_tri( setup_ctx, + llvmpipe_setup_tri( setup_ctx, get_vert(vertex_buffer, indices[i-2], stride), get_vert(vertex_buffer, indices[i-1], stride), get_vert(vertex_buffer, indices[i-3], stride) ); - setup_tri( setup_ctx, + llvmpipe_setup_tri( setup_ctx, get_vert(vertex_buffer, indices[i-1], stride), get_vert(vertex_buffer, indices[i-0], stride), get_vert(vertex_buffer, indices[i-3], stride) ); } else { - setup_tri( setup_ctx, + llvmpipe_setup_tri( setup_ctx, get_vert(vertex_buffer, indices[i-3], stride), get_vert(vertex_buffer, indices[i-2], stride), get_vert(vertex_buffer, indices[i-0], stride) ); - setup_tri( setup_ctx, + llvmpipe_setup_tri( setup_ctx, get_vert(vertex_buffer, indices[i-2], stride), get_vert(vertex_buffer, indices[i-1], stride), get_vert(vertex_buffer, indices[i-0], stride) ); @@ -318,21 +318,21 @@ lp_vbuf_draw(struct vbuf_render *vbr, const ushort *indices, uint nr) case PIPE_PRIM_QUAD_STRIP: for (i = 3; i < nr; i += 2) { if (llvmpipe->rasterizer->flatshade_first) { - setup_tri( setup_ctx, + llvmpipe_setup_tri( setup_ctx, get_vert(vertex_buffer, indices[i-0], stride), get_vert(vertex_buffer, indices[i-1], stride), get_vert(vertex_buffer, indices[i-3], stride)); - setup_tri( setup_ctx, + llvmpipe_setup_tri( setup_ctx, get_vert(vertex_buffer, indices[i-2], stride), get_vert(vertex_buffer, indices[i-0], stride), get_vert(vertex_buffer, indices[i-3], stride) ); } else { - setup_tri( setup_ctx, + llvmpipe_setup_tri( setup_ctx, get_vert(vertex_buffer, indices[i-3], stride), get_vert(vertex_buffer, indices[i-2], stride), get_vert(vertex_buffer, indices[i-0], stride) ); - setup_tri( setup_ctx, + llvmpipe_setup_tri( setup_ctx, get_vert(vertex_buffer, indices[i-1], stride), get_vert(vertex_buffer, indices[i-3], stride), get_vert(vertex_buffer, indices[i-0], stride) ); @@ -347,7 +347,7 @@ lp_vbuf_draw(struct vbuf_render *vbr, const ushort *indices, uint nr) * flatshade_first state makes no difference. */ for (i = 2; i < nr; i += 1) { - setup_tri( setup_ctx, + llvmpipe_setup_tri( setup_ctx, get_vert(vertex_buffer, indices[i-0], stride), get_vert(vertex_buffer, indices[i-1], stride), get_vert(vertex_buffer, indices[0], stride) ); @@ -388,14 +388,14 @@ lp_vbuf_draw_arrays(struct vbuf_render *vbr, uint start, uint nr) switch (cvbr->prim) { case PIPE_PRIM_POINTS: for (i = 0; i < nr; i++) { - setup_point( setup_ctx, + llvmpipe_setup_point( setup_ctx, get_vert(vertex_buffer, i-0, stride) ); } break; case PIPE_PRIM_LINES: for (i = 1; i < nr; i += 2) { - setup_line( setup_ctx, + llvmpipe_setup_line( setup_ctx, get_vert(vertex_buffer, i-1, stride), get_vert(vertex_buffer, i-0, stride) ); } @@ -403,7 +403,7 @@ lp_vbuf_draw_arrays(struct vbuf_render *vbr, uint start, uint nr) case PIPE_PRIM_LINE_STRIP: for (i = 1; i < nr; i ++) { - setup_line( setup_ctx, + llvmpipe_setup_line( setup_ctx, get_vert(vertex_buffer, i-1, stride), get_vert(vertex_buffer, i-0, stride) ); } @@ -411,12 +411,12 @@ lp_vbuf_draw_arrays(struct vbuf_render *vbr, uint start, uint nr) case PIPE_PRIM_LINE_LOOP: for (i = 1; i < nr; i ++) { - setup_line( setup_ctx, + llvmpipe_setup_line( setup_ctx, get_vert(vertex_buffer, i-1, stride), get_vert(vertex_buffer, i-0, stride) ); } if (nr) { - setup_line( setup_ctx, + llvmpipe_setup_line( setup_ctx, get_vert(vertex_buffer, nr-1, stride), get_vert(vertex_buffer, 0, stride) ); } @@ -425,13 +425,13 @@ lp_vbuf_draw_arrays(struct vbuf_render *vbr, uint start, uint nr) case PIPE_PRIM_TRIANGLES: for (i = 2; i < nr; i += 3) { if (llvmpipe->rasterizer->flatshade_first) { - setup_tri( setup_ctx, + llvmpipe_setup_tri( setup_ctx, get_vert(vertex_buffer, i-1, stride), get_vert(vertex_buffer, i-0, stride), get_vert(vertex_buffer, i-2, stride) ); } else { - setup_tri( setup_ctx, + llvmpipe_setup_tri( setup_ctx, get_vert(vertex_buffer, i-2, stride), get_vert(vertex_buffer, i-1, stride), get_vert(vertex_buffer, i-0, stride) ); @@ -442,13 +442,13 @@ lp_vbuf_draw_arrays(struct vbuf_render *vbr, uint start, uint nr) case PIPE_PRIM_TRIANGLE_STRIP: for (i = 2; i < nr; i++) { if (llvmpipe->rasterizer->flatshade_first) { - setup_tri( setup_ctx, + llvmpipe_setup_tri( setup_ctx, get_vert(vertex_buffer, i+(i&1)-1, stride), get_vert(vertex_buffer, i-(i&1), stride), get_vert(vertex_buffer, i-2, stride) ); } else { - setup_tri( setup_ctx, + llvmpipe_setup_tri( setup_ctx, get_vert(vertex_buffer, i+(i&1)-2, stride), get_vert(vertex_buffer, i-(i&1)-1, stride), get_vert(vertex_buffer, i-0, stride) ); @@ -459,13 +459,13 @@ lp_vbuf_draw_arrays(struct vbuf_render *vbr, uint start, uint nr) case PIPE_PRIM_TRIANGLE_FAN: for (i = 2; i < nr; i += 1) { if (llvmpipe->rasterizer->flatshade_first) { - setup_tri( setup_ctx, + llvmpipe_setup_tri( setup_ctx, get_vert(vertex_buffer, i-0, stride), get_vert(vertex_buffer, 0, stride), get_vert(vertex_buffer, i-1, stride) ); } else { - setup_tri( setup_ctx, + llvmpipe_setup_tri( setup_ctx, get_vert(vertex_buffer, 0, stride), get_vert(vertex_buffer, i-1, stride), get_vert(vertex_buffer, i-0, stride) ); @@ -476,21 +476,21 @@ lp_vbuf_draw_arrays(struct vbuf_render *vbr, uint start, uint nr) case PIPE_PRIM_QUADS: for (i = 3; i < nr; i += 4) { if (llvmpipe->rasterizer->flatshade_first) { - setup_tri( setup_ctx, + llvmpipe_setup_tri( setup_ctx, get_vert(vertex_buffer, i-2, stride), get_vert(vertex_buffer, i-1, stride), get_vert(vertex_buffer, i-3, stride) ); - setup_tri( setup_ctx, + llvmpipe_setup_tri( setup_ctx, get_vert(vertex_buffer, i-1, stride), get_vert(vertex_buffer, i-0, stride), get_vert(vertex_buffer, i-3, stride) ); } else { - setup_tri( setup_ctx, + llvmpipe_setup_tri( setup_ctx, get_vert(vertex_buffer, i-3, stride), get_vert(vertex_buffer, i-2, stride), get_vert(vertex_buffer, i-0, stride) ); - setup_tri( setup_ctx, + llvmpipe_setup_tri( setup_ctx, get_vert(vertex_buffer, i-2, stride), get_vert(vertex_buffer, i-1, stride), get_vert(vertex_buffer, i-0, stride) ); @@ -501,21 +501,21 @@ lp_vbuf_draw_arrays(struct vbuf_render *vbr, uint start, uint nr) case PIPE_PRIM_QUAD_STRIP: for (i = 3; i < nr; i += 2) { if (llvmpipe->rasterizer->flatshade_first) { - setup_tri( setup_ctx, + llvmpipe_setup_tri( setup_ctx, get_vert(vertex_buffer, i-0, stride), get_vert(vertex_buffer, i-1, stride), get_vert(vertex_buffer, i-3, stride) ); - setup_tri( setup_ctx, + llvmpipe_setup_tri( setup_ctx, get_vert(vertex_buffer, i-2, stride), get_vert(vertex_buffer, i-0, stride), get_vert(vertex_buffer, i-3, stride) ); } else { - setup_tri( setup_ctx, + llvmpipe_setup_tri( setup_ctx, get_vert(vertex_buffer, i-3, stride), get_vert(vertex_buffer, i-2, stride), get_vert(vertex_buffer, i-0, stride) ); - setup_tri( setup_ctx, + llvmpipe_setup_tri( setup_ctx, get_vert(vertex_buffer, i-1, stride), get_vert(vertex_buffer, i-3, stride), get_vert(vertex_buffer, i-0, stride) ); @@ -530,7 +530,7 @@ lp_vbuf_draw_arrays(struct vbuf_render *vbr, uint start, uint nr) * flatshade_first state makes no difference. */ for (i = 2; i < nr; i += 1) { - setup_tri( setup_ctx, + llvmpipe_setup_tri( setup_ctx, get_vert(vertex_buffer, i-1, stride), get_vert(vertex_buffer, i-0, stride), get_vert(vertex_buffer, 0, stride) ); diff --git a/src/gallium/drivers/llvmpipe/lp_setup.c b/src/gallium/drivers/llvmpipe/lp_setup.c index f06538c75f5..3474f9f82bb 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup.c +++ b/src/gallium/drivers/llvmpipe/lp_setup.c @@ -763,7 +763,7 @@ calc_det( const float (*v0)[4], /** * Do setup for triangle rasterization, then render the triangle. */ -void setup_tri( struct setup_context *setup, +void llvmpipe_setup_tri( struct setup_context *setup, const float (*v0)[4], const float (*v1)[4], const float (*v2)[4] ) @@ -1003,7 +1003,7 @@ plot(struct setup_context *setup, int x, int y) * to handle stippling and wide lines. */ void -setup_line(struct setup_context *setup, +llvmpipe_setup_line(struct setup_context *setup, const float (*v0)[4], const float (*v1)[4]) { @@ -1135,7 +1135,7 @@ point_persp_coeff(struct setup_context *setup, * XXX could optimize a lot for 1-pixel points. */ void -setup_point( struct setup_context *setup, +llvmpipe_setup_point( struct setup_context *setup, const float (*v0)[4] ) { struct llvmpipe_context *llvmpipe = setup->llvmpipe; @@ -1332,7 +1332,7 @@ setup_point( struct setup_context *setup, } } -void setup_prepare( struct setup_context *setup ) +void llvmpipe_setup_prepare( struct setup_context *setup ) { struct llvmpipe_context *lp = setup->llvmpipe; @@ -1356,7 +1356,7 @@ void setup_prepare( struct setup_context *setup ) -void setup_destroy_context( struct setup_context *setup ) +void llvmpipe_setup_destroy_context( struct setup_context *setup ) { align_free( setup ); } @@ -1365,7 +1365,7 @@ void setup_destroy_context( struct setup_context *setup ) /** * Create a new primitive setup/render stage. */ -struct setup_context *setup_create_context( struct llvmpipe_context *llvmpipe ) +struct setup_context *llvmpipe_setup_create_context( struct llvmpipe_context *llvmpipe ) { struct setup_context *setup; unsigned i; diff --git a/src/gallium/drivers/llvmpipe/lp_setup.h b/src/gallium/drivers/llvmpipe/lp_setup.h index f55f7e10205..89c43da0460 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup.h +++ b/src/gallium/drivers/llvmpipe/lp_setup.h @@ -31,23 +31,23 @@ struct setup_context; struct llvmpipe_context; void -setup_tri( struct setup_context *setup, +llvmpipe_setup_tri( struct setup_context *setup, const float (*v0)[4], const float (*v1)[4], const float (*v2)[4] ); void -setup_line(struct setup_context *setup, +llvmpipe_setup_line(struct setup_context *setup, const float (*v0)[4], const float (*v1)[4]); void -setup_point( struct setup_context *setup, +llvmpipe_setup_point( struct setup_context *setup, const float (*v0)[4] ); -struct setup_context *setup_create_context( struct llvmpipe_context *llvmpipe ); -void setup_prepare( struct setup_context *setup ); -void setup_destroy_context( struct setup_context *setup ); +struct setup_context *llvmpipe_setup_create_context( struct llvmpipe_context *llvmpipe ); +void llvmpipe_setup_prepare( struct setup_context *setup ); +void llvmpipe_setup_destroy_context( struct setup_context *setup ); #endif |