svga: Add a winsys callback to get the svga_winsys_context

The winsys may need to extract the svga_winsys_context from a
pipe_context. Add a function to enable that functionality.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
This commit is contained in:
Thomas Hellstrom 2010-02-27 15:13:49 +01:00
parent 7941d31ee6
commit e8a8c5e339
2 changed files with 8 additions and 0 deletions

View file

@ -284,3 +284,8 @@ void svga_hwtnl_flush_retry( struct svga_context *svga )
assert(ret == 0);
}
struct svga_winsys_context *
svga_winsys_context( struct pipe_context *pipe )
{
return svga_context( pipe )->swc;
}

View file

@ -281,6 +281,9 @@ svga_screen_create(struct svga_winsys_screen *sws);
struct svga_winsys_screen *
svga_winsys_screen(struct pipe_screen *screen);
struct svga_winsys_context *
svga_winsys_context(struct pipe_context *context);
struct pipe_buffer *
svga_screen_buffer_wrap_surface(struct pipe_screen *screen,
enum SVGA3dSurfaceFormat format,