struct xm_driver {
struct pipe_screen *(*create_pipe_screen)( Display *display );
-
- void (*display_surface)( struct xlib_drawable *,
- struct pipe_surface * );
};
/* Called by the libgl-xlib target code to build the rendering stack.
st_swapbuffers(b->stfb, &frontLeftSurf, NULL);
if (frontLeftSurf) {
- if (_screen != screen) {
- struct trace_surface *tr_surf = trace_surface( frontLeftSurf );
- struct pipe_surface *surf = tr_surf->surface;
- frontLeftSurf = surf;
- }
-
- driver.display_surface(&b->ws, frontLeftSurf);
+ screen->flush_frontbuffer( screen,
+ frontLeftSurf,
+ &b->ws );
}
xmesa_check_and_update_buffer_size(NULL, b);
}
-static void
-xlib_llvmpipe_display_surface(struct xlib_drawable *xm_buffer,
- struct pipe_surface *surf)
-{
- struct llvmpipe_texture *texture = llvmpipe_texture(surf->texture);
-
- assert(texture->dt);
- if (texture->dt)
- xlib_sw_display(xm_buffer, texture->dt);
-}
-
-
struct xm_driver xlib_llvmpipe_driver =
{
.create_pipe_screen = xlib_create_llvmpipe_screen,
- .display_surface = xlib_llvmpipe_display_surface
};
}
-static void
-xlib_softpipe_display_surface(struct xlib_drawable *xm_buffer,
- struct pipe_surface *surf)
-{
- struct softpipe_texture *texture = softpipe_texture(surf->texture);
-
- assert(texture->dt);
- if (texture->dt)
- xlib_sw_display(xm_buffer, texture->dt);
-}
struct xm_driver xlib_softpipe_driver =
{
.create_pipe_screen = xlib_create_softpipe_screen,
- .display_surface = xlib_softpipe_display_surface
};