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

@@ -941,14 +941,14 @@ rbug_clear_depth_stencil(struct pipe_context *_pipe,
static void
rbug_flush(struct pipe_context *_pipe,
struct pipe_fence_handle **fence)
struct pipe_fence_handle **fence,
enum pipe_flush_flags flags)
{
struct rbug_context *rb_pipe = rbug_context(_pipe);
struct pipe_context *pipe = rb_pipe->pipe;
pipe_mutex_lock(rb_pipe->call_mutex);
pipe->flush(pipe,
fence);
pipe->flush(pipe, fence, flags);
pipe_mutex_unlock(rb_pipe->call_mutex);
}