llvmpipe: prefix point/line/tri_setup() functions with llvmpipe_
authorBrian Paul <brianp@vmware.com>
Tue, 18 Aug 2009 22:55:24 +0000 (16:55 -0600)
committerJosé Fonseca <jfonseca@vmware.com>
Sat, 29 Aug 2009 08:21:35 +0000 (09:21 +0100)
Avoid symbol collisions with softpipe.

src/gallium/drivers/llvmpipe/lp_prim_setup.c
src/gallium/drivers/llvmpipe/lp_prim_vbuf.c
src/gallium/drivers/llvmpipe/lp_setup.c
src/gallium/drivers/llvmpipe/lp_setup.h

index 5a5a6175005b2db47bfbd793949b55c44bdd6d1a..b14f8fb99d98f922b196a64a4f3726bb7c82c15f 100644 (file)
@@ -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;
index 15795b9a0776a59aae97e90a6d2f90d835fbefbf..7b0b98a853223fb8e134fd929f35193ef72d488c 100644 (file)
@@ -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) );
index f06538c75f5905dcd5076a3faf544b0f7ac022cf..3474f9f82bb4aba3921ae08be91d7dfb31817e1b 100644 (file)
@@ -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;
index f55f7e10205884be25b9bac1ff2e86b7dbcb76d1..89c43da04605ec819105803df97fc84e545bae64 100644 (file)
@@ -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