st_cb_flush.c File Reference

Include dependency graph for st_cb_flush.c:

Go to the source code of this file.

Functions

static GLboolean is_front_buffer_dirty (struct st_context *st)
static void display_front_buffer (struct st_context *st)
 Tell the winsys to display the front color buffer on-screen.
void st_flush (struct st_context *st, uint pipeFlushFlags, struct pipe_fence_handle **fence)
void st_finish (struct st_context *st)
 Flush, and wait for completion.
static void st_glFlush (GLcontext *ctx)
 Called via ctx->Driver.Flush().
static void st_glFinish (GLcontext *ctx)
 Called via ctx->Driver.Finish().
void st_init_flush_functions (struct dd_function_table *functions)


Function Documentation

static void display_front_buffer ( struct st_context st  )  [static]

Tell the winsys to display the front color buffer on-screen.

Definition at line 61 of file st_cb_flush.c.

References st_context::ctx, pipe_winsys::flush_frontbuffer, st_context::pipe, pipe_context::priv, st_renderbuffer(), st_renderbuffer::surface, and pipe_context::winsys.

00062 {
00063    GLframebuffer *fb = st->ctx->DrawBuffer;
00064    struct st_renderbuffer *strb
00065       = st_renderbuffer(fb->Attachment[BUFFER_FRONT_LEFT].Renderbuffer);
00066    struct pipe_surface *front_surf = strb->surface;
00067 
00068    /* Hook for copying "fake" frontbuffer if necessary:
00069     */
00070    st->pipe->winsys->flush_frontbuffer( st->pipe->winsys, front_surf,
00071                                         st->pipe->priv );
00072 
00073    /*
00074    st->frontbuffer_status = FRONT_STATUS_UNDEFINED;
00075    */
00076 }

static GLboolean is_front_buffer_dirty ( struct st_context st  )  [static]

Definition at line 51 of file st_cb_flush.c.

References FRONT_STATUS_DIRTY, and st_context::frontbuffer_status.

00052 {
00053    return st->frontbuffer_status == FRONT_STATUS_DIRTY;
00054 }

void st_finish ( struct st_context st  ) 

Flush, and wait for completion.

Definition at line 99 of file st_cb_flush.c.

References pipe_winsys::fence_finish, pipe_winsys::fence_reference, st_context::pipe, PIPE_FLUSH_FRAME, PIPE_FLUSH_RENDER_CACHE, st_flush(), and pipe_context::winsys.

00100 {
00101    struct pipe_fence_handle *fence = NULL;
00102 
00103    st_flush(st, PIPE_FLUSH_RENDER_CACHE | PIPE_FLUSH_FRAME, &fence);
00104 
00105    if(fence) {
00106       st->pipe->winsys->fence_finish(st->pipe->winsys, fence, 0);
00107       st->pipe->winsys->fence_reference(st->pipe->winsys, &fence, NULL);
00108    }
00109 }

void st_flush ( struct st_context st,
uint  pipeFlushFlags,
struct pipe_fence_handle **  fence 
)

Definition at line 79 of file st_cb_flush.c.

References st_context::blit, st_context::ctx, pipe_context::flush, st_context::gen_mipmap, st_context::pipe, st_flush_bitmap(), st_flush_clear(), util_blit_flush(), and util_gen_mipmap_flush().

00081 {
00082    FLUSH_VERTICES(st->ctx, 0);
00083 
00084    /* Release any vertex buffers that might potentially be accessed in
00085     * successive frames:
00086     */
00087    st_flush_bitmap(st);
00088    st_flush_clear(st);
00089    util_blit_flush(st->blit);
00090    util_gen_mipmap_flush(st->gen_mipmap);
00091 
00092    st->pipe->flush( st->pipe, pipeFlushFlags, fence );
00093 }

static void st_glFinish ( GLcontext *  ctx  )  [static]

Called via ctx->Driver.Finish().

Definition at line 133 of file st_cb_flush.c.

References display_front_buffer(), is_front_buffer_dirty(), and st_finish().

00134 {
00135    struct st_context *st = ctx->st;
00136 
00137    st_finish(st);
00138 
00139    if (is_front_buffer_dirty(st)) {
00140       display_front_buffer(st);
00141    }
00142 }

static void st_glFlush ( GLcontext *  ctx  )  [static]

Called via ctx->Driver.Flush().

Definition at line 116 of file st_cb_flush.c.

References display_front_buffer(), is_front_buffer_dirty(), PIPE_FLUSH_RENDER_CACHE, st_finish(), and st_flush().

00117 {
00118    struct st_context *st = ctx->st;
00119 
00120    if (is_front_buffer_dirty(st)) {
00121       st_finish(st);
00122       display_front_buffer(st);
00123    }
00124    else {
00125       st_flush(st, PIPE_FLUSH_RENDER_CACHE, NULL);
00126    }
00127 }

void st_init_flush_functions ( struct dd_function_table *  functions  ) 

Definition at line 145 of file st_cb_flush.c.

References st_glFinish(), and st_glFlush().

00146 {
00147    functions->Flush = st_glFlush;
00148    functions->Finish = st_glFinish;
00149 }


Generated on Tue Sep 29 06:25:53 2009 for Gallium3D by  doxygen 1.5.4