Provide mechanism to hook in custom vertex shader cache flush function

This commit is contained in:
Ian Romanick 2008-01-29 11:43:04 -08:00 committed by Ben Skeggs
parent fc4620554a
commit d798e7e268
3 changed files with 8 additions and 1 deletions

View file

@ -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;

View file

@ -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)

View file

@ -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 {