gallium: extend pipe_context::flush for it to accept an END_OF_FRAME flag

Usage with pipe_context:
  pipe->flush(pipe, NULL, PIPE_FLUSH_END_OF_FRAME);

Usage with st_context_iface:
  st->flush(st, ST_FLUSH_END_OF_FRAME, NULL);

The flag is only a hint for drivers. Radeon will use it for buffer eviction
heuristics in the kernel (e.g. for queries like how many frames have passed
since a buffer was used).

The flag is currently only generated by st/dri on SwapBuffers.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
This commit is contained in:
Marek Olšák
2012-12-21 17:03:22 +01:00
parent 4ad5ebaefa
commit 598cc1f74d
63 changed files with 120 additions and 81 deletions

View File

@@ -158,6 +158,7 @@ enum st_context_resource_type {
* Flush flags.
*/
#define ST_FLUSH_FRONT (1 << 0)
#define ST_FLUSH_END_OF_FRAME (1 << 1)
/**
* Value to st_manager->get_param function.