mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-30 09:20:23 +01:00
Provide mechanism to hook in custom vertex shader cache flush function
This commit is contained in:
parent
fc4620554a
commit
d798e7e268
3 changed files with 8 additions and 1 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue