summaryrefslogtreecommitdiffstats
path: root/src/mesa/pipe/softpipe
diff options
context:
space:
mode:
authorBrian <[email protected]>2008-01-23 12:48:41 -0700
committerBrian <[email protected]>2008-01-23 12:48:41 -0700
commitcd3643698eafa0869a8317b002e5b066de0172e7 (patch)
treee7474c2e8079b5069b68adca09bd9882bf65c4c9 /src/mesa/pipe/softpipe
parentb3f081999f8eb904370df7492e39184268c77c13 (diff)
gallium: overhaul usage of vertex_info in draw module.
Remove all dependencies on vertex_info, except for draw_vbuf. Drawing stages now strictly operate on post-transformed vertices and don't know anything about hw vertices. Use vertex program output info for two-side/flat/etc stages. Temporarily disable vbuf module in softpipe driver.
Diffstat (limited to 'src/mesa/pipe/softpipe')
-rw-r--r--src/mesa/pipe/softpipe/sp_context.c2
-rw-r--r--src/mesa/pipe/softpipe/sp_context.h2
-rw-r--r--src/mesa/pipe/softpipe/sp_prim_setup.c2
-rw-r--r--src/mesa/pipe/softpipe/sp_prim_vbuf.c5
-rw-r--r--src/mesa/pipe/softpipe/sp_state_derived.c7
5 files changed, 13 insertions, 5 deletions
diff --git a/src/mesa/pipe/softpipe/sp_context.c b/src/mesa/pipe/softpipe/sp_context.c
index 68c18e2d05b..6dccedbdcb4 100644
--- a/src/mesa/pipe/softpipe/sp_context.c
+++ b/src/mesa/pipe/softpipe/sp_context.c
@@ -328,7 +328,7 @@ struct pipe_context *softpipe_create( struct pipe_winsys *pipe_winsys,
assert(softpipe->draw);
softpipe->setup = sp_draw_render_stage(softpipe);
- if (GETENV( "SP_VBUF" ) != NULL) {
+ if (0 && GETENV( "SP_VBUF" ) != NULL) {
softpipe->vbuf = sp_draw_vbuf_stage(softpipe->draw,
&softpipe->pipe,
sp_vbuf_render);
diff --git a/src/mesa/pipe/softpipe/sp_context.h b/src/mesa/pipe/softpipe/sp_context.h
index 3537f86a61e..4ce04100759 100644
--- a/src/mesa/pipe/softpipe/sp_context.h
+++ b/src/mesa/pipe/softpipe/sp_context.h
@@ -40,6 +40,7 @@
struct softpipe_winsys;
+struct softpipe_vbuf_render;
struct draw_context;
struct draw_stage;
struct softpipe_tile_cache;
@@ -125,6 +126,7 @@ struct softpipe_context {
struct draw_context *draw;
struct draw_stage *setup;
struct draw_stage *vbuf;
+ struct softpipe_vbuf_render *vbuf_render;
uint current_cbuf; /**< current color buffer being written to */
diff --git a/src/mesa/pipe/softpipe/sp_prim_setup.c b/src/mesa/pipe/softpipe/sp_prim_setup.c
index cdc385e4dbe..533a2fbd4d1 100644
--- a/src/mesa/pipe/softpipe/sp_prim_setup.c
+++ b/src/mesa/pipe/softpipe/sp_prim_setup.c
@@ -1278,7 +1278,7 @@ void sp_vbuf_render( struct pipe_context *pipe,
struct softpipe_context *softpipe = softpipe_context( pipe );
struct setup_stage *setup = setup_stage( softpipe->setup );
struct prim_header prim;
- unsigned vertex_size = setup->stage.draw->vertex_info.size * sizeof(float);
+ unsigned vertex_size = softpipe->vertex_info.size * sizeof(float);
unsigned i, j;
prim.det = 0;
diff --git a/src/mesa/pipe/softpipe/sp_prim_vbuf.c b/src/mesa/pipe/softpipe/sp_prim_vbuf.c
index 055cb19f9a5..1d58e375a99 100644
--- a/src/mesa/pipe/softpipe/sp_prim_vbuf.c
+++ b/src/mesa/pipe/softpipe/sp_prim_vbuf.c
@@ -263,8 +263,11 @@ static void vbuf_flush_elements( struct draw_stage *stage )
static void vbuf_begin( struct draw_stage *stage )
{
struct vbuf_stage *vbuf = vbuf_stage(stage);
+ struct softpipe_context *softpipe = softpipe_context(vbuf->pipe);
- vbuf->vertex_size = vbuf->draw_context->vertex_info.size * sizeof(float);
+ //vbuf->vertex_size = vbuf->draw_context->vertex_info.size * sizeof(float);
+
+ vbuf->vertex_size = softpipe->vertex_info.size * sizeof(float);
}
diff --git a/src/mesa/pipe/softpipe/sp_state_derived.c b/src/mesa/pipe/softpipe/sp_state_derived.c
index 0f1410e5ded..64e86a0d86d 100644
--- a/src/mesa/pipe/softpipe/sp_state_derived.c
+++ b/src/mesa/pipe/softpipe/sp_state_derived.c
@@ -122,6 +122,8 @@ static void calculate_vertex_layout( struct softpipe_context *softpipe )
}
}
+ draw_compute_vertex_size(vinfo);
+
softpipe->nr_frag_attrs = fs->num_inputs;
/* We want these after all other attribs since they won't get passed
@@ -146,10 +148,11 @@ static void calculate_vertex_layout( struct softpipe_context *softpipe )
if (1/*vinfo->attr_mask != softpipe->attr_mask*/) {
/*softpipe->attr_mask = vinfo->attr_mask;*/
- draw_set_vertex_info( softpipe->draw, vinfo);
+ /*draw_set_vertex_info( softpipe->draw, vinfo);*/
- draw_set_twoside_attributes(softpipe->draw,
+ /*draw_set_twoside_attributes(softpipe->draw,
front0, back0, front1, back1);
+ */
}
}