diff options
author | Ian Romanick <idr@us.ibm.com> | 2008-01-29 11:43:04 -0800 |
---|---|---|
committer | Ian Romanick <idr@us.ibm.com> | 2008-01-30 20:14:51 -0800 |
commit | 3d13605ee5fc92a1e3d82f1dbbcb8342066d8af0 (patch) | |
tree | 902b8c0ba7ce34b48e10a7537955b8c6c918bf11 /src/mesa | |
parent | 13eec106881b846538bef13d694c9d2d9cf1ae6b (diff) |
Provide mechanism to hook in custom vertex shader cache flush function
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/pipe/draw/draw_context.c | 2 | ||||
-rw-r--r-- | src/mesa/pipe/draw/draw_prim.c | 2 | ||||
-rw-r--r-- | src/mesa/pipe/draw/draw_private.h | 5 |
3 files changed, 8 insertions, 1 deletions
diff --git a/src/mesa/pipe/draw/draw_context.c b/src/mesa/pipe/draw/draw_context.c index 711bcd02f6..87f4969983 100644 --- a/src/mesa/pipe/draw/draw_context.c +++ b/src/mesa/pipe/draw/draw_context.c @@ -78,6 +78,8 @@ struct draw_context *draw_create( void ) draw->vcache.vertex[i] = (struct vertex_header *)(tmp + i * size); } + draw->shader_queue_flush = draw_vertex_shader_queue_flush; + draw->convert_wide_points = TRUE; draw->convert_wide_lines = TRUE; diff --git a/src/mesa/pipe/draw/draw_prim.c b/src/mesa/pipe/draw/draw_prim.c index 41b3fddcc1..58400213d7 100644 --- a/src/mesa/pipe/draw/draw_prim.c +++ b/src/mesa/pipe/draw/draw_prim.c @@ -127,7 +127,7 @@ void draw_do_flush( struct draw_context *draw, unsigned flags ) if (flags >= DRAW_FLUSH_SHADER_QUEUE) { if (draw->vs.queue_nr) - draw_vertex_shader_queue_flush(draw); + (*draw->shader_queue_flush)(draw); if (flags >= DRAW_FLUSH_PRIM_QUEUE) { if (draw->pq.queue_nr) diff --git a/src/mesa/pipe/draw/draw_private.h b/src/mesa/pipe/draw/draw_private.h index 21de400676..fea6d94ed8 100644 --- a/src/mesa/pipe/draw/draw_private.h +++ b/src/mesa/pipe/draw/draw_private.h @@ -240,6 +240,11 @@ struct draw_context unsigned queue_nr; } vs; + /** + * Run the vertex shader on all vertices in the vertex queue. + */ + void (*shader_queue_flush)(struct draw_context *draw); + /* Prim pipeline queue: */ struct { |