llvmpipe: rename sprite field, add sprite_coord_origin
authorBrian Paul <brianp@vmware.com>
Mon, 20 Sep 2010 19:29:55 +0000 (13:29 -0600)
committerBrian Paul <brianp@vmware.com>
Mon, 20 Sep 2010 19:37:39 +0000 (13:37 -0600)
src/gallium/drivers/llvmpipe/lp_setup.c
src/gallium/drivers/llvmpipe/lp_setup.h
src/gallium/drivers/llvmpipe/lp_setup_context.h
src/gallium/drivers/llvmpipe/lp_setup_point.c
src/gallium/drivers/llvmpipe/lp_state_rasterizer.c

index 6674d281d1e2c14965962b8ab3fd0594a7520a5d..ea7002aafcf472adecf123dcb97e714c10e446aa 100644 (file)
@@ -490,12 +490,14 @@ void
 lp_setup_set_point_state( struct lp_setup_context *setup,
                           float point_size,                          
                           boolean point_size_per_vertex,
-                          uint sprite)
+                          uint sprite_coord_enable,
+                          uint sprite_coord_origin)
 {
    LP_DBG(DEBUG_SETUP, "%s\n", __FUNCTION__);
 
    setup->point_size = point_size;
-   setup->sprite = sprite;
+   setup->sprite_coord_enable = sprite_coord_enable;
+   setup->sprite_coord_origin = sprite_coord_origin;
    setup->point_size_per_vertex = point_size_per_vertex;
 }
 
index b94061b7d490ef5b41d9e42abb1be7526cbfbc7d..81ff43f8adc7da9e8f51de091d9bb0042c952978 100644 (file)
@@ -107,7 +107,8 @@ void
 lp_setup_set_point_state( struct lp_setup_context *setup,
                           float point_size,                          
                           boolean point_size_per_vertex,
-                          uint sprite);
+                          uint sprite_coord_enable,
+                          uint sprite_coord_origin);
 
 void
 lp_setup_set_fs_inputs( struct lp_setup_context *setup,
index 80b356476ab07b5acc8c2b3aa918f090b6d4c1d9..8506ed2dc9eac5c364d0a6496f0b0152e1d4a8d5 100644 (file)
@@ -73,7 +73,7 @@ struct lp_setup_context
    uint prim;
    uint vertex_size;
    uint nr_vertices;
-   uint sprite;
+   uint sprite_coord_enable, sprite_coord_origin;
    uint vertex_buffer_size;
    void *vertex_buffer;
 
index fb4fb2c436bbb2c82f9335ffecfba5101d4319b1..f8f411f4f16585d511e6457b6efaccbe71eda4b4 100644 (file)
@@ -184,7 +184,7 @@ setup_point_coefficients( struct lp_setup_context *setup,
          if (shader->info.input_semantic_name[slot] == TGSI_SEMANTIC_GENERIC) {
             const int index = shader->info.input_semantic_index[slot];
             
-            if (setup->sprite & (1 << index)) {
+            if (setup->sprite_coord_enable & (1 << index)) {
                for (i = 0; i < NUM_CHANNELS; i++)
                   if (usage_mask & (1 << i))
                      perspective_coef(setup, point, info, slot+1, vert_attr, i);
index b81c2cfd15d68af82850fcd2fdf8f71bf435d56d..dbd73812e458ce4541c9e5493c385d9ab21ccb9a 100644 (file)
@@ -78,7 +78,8 @@ llvmpipe_bind_rasterizer_state(struct pipe_context *pipe, void *handle)
       lp_setup_set_point_state( llvmpipe->setup,
                    llvmpipe->rasterizer->point_size,
                    llvmpipe->rasterizer->point_size_per_vertex,
-                   llvmpipe->rasterizer->sprite_coord_enable);
+                   llvmpipe->rasterizer->sprite_coord_enable,
+                   llvmpipe->rasterizer->sprite_coord_mode);
    }
 
    llvmpipe->dirty |= LP_NEW_RASTERIZER;