Provide mechanism to hook in custom vertex shader cache flush function
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user