mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-31 20:40:09 +01:00
gallium: refactor code, new flush_front_buffer() function
This commit is contained in:
parent
a52faa9325
commit
9c86c0e88b
1 changed files with 25 additions and 17 deletions
|
|
@ -44,26 +44,12 @@
|
|||
#include "pipe/p_winsys.h"
|
||||
|
||||
|
||||
void st_flush( struct st_context *st, uint pipeFlushFlags,
|
||||
struct pipe_fence_handle **fence )
|
||||
{
|
||||
FLUSH_VERTICES(st->ctx, 0);
|
||||
|
||||
st_flush_bitmap_cache(st);
|
||||
|
||||
st->pipe->flush( st->pipe, pipeFlushFlags, fence );
|
||||
}
|
||||
|
||||
|
||||
static void st_gl_flush( struct st_context *st, uint pipeFlushFlags,
|
||||
struct pipe_fence_handle **fence )
|
||||
static void
|
||||
flush_front_buffer(struct st_context *st, uint pipeFlushFlags,
|
||||
struct pipe_fence_handle **fence)
|
||||
{
|
||||
GLframebuffer *fb = st->ctx->DrawBuffer;
|
||||
|
||||
st_flush_bitmap_cache(st);
|
||||
|
||||
FLUSH_VERTICES(st->ctx, 0);
|
||||
|
||||
if (!fb)
|
||||
return;
|
||||
|
||||
|
|
@ -105,6 +91,28 @@ static void st_gl_flush( struct st_context *st, uint pipeFlushFlags,
|
|||
}
|
||||
|
||||
|
||||
void st_flush( struct st_context *st, uint pipeFlushFlags,
|
||||
struct pipe_fence_handle **fence )
|
||||
{
|
||||
FLUSH_VERTICES(st->ctx, 0);
|
||||
|
||||
st_flush_bitmap_cache(st);
|
||||
|
||||
st->pipe->flush( st->pipe, pipeFlushFlags, fence );
|
||||
}
|
||||
|
||||
|
||||
static void st_gl_flush( struct st_context *st, uint pipeFlushFlags,
|
||||
struct pipe_fence_handle **fence )
|
||||
{
|
||||
st_flush_bitmap_cache(st);
|
||||
|
||||
FLUSH_VERTICES(st->ctx, 0);
|
||||
|
||||
flush_front_buffer(st, pipeFlushFlags, fence);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Called via ctx->Driver.Flush()
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue