summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorThomas Hellstrom <[email protected]>2010-02-27 15:13:49 +0100
committerThomas Hellstrom <[email protected]>2010-03-06 11:03:54 +0100
commite8a8c5e339dfd7a36bb6435fd34175482b9187b8 (patch)
treee546cdfbda8feaafb78cec6ebd01e0d0f3e3a179 /src
parent7941d31ee6ef151c08e2e9cf288dde564fd9b576 (diff)
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 <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/svga/svga_context.c5
-rw-r--r--src/gallium/drivers/svga/svga_winsys.h3
2 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/drivers/svga/svga_context.c b/src/gallium/drivers/svga/svga_context.c
index 1e76592ec60..5a7311c485e 100644
--- a/src/gallium/drivers/svga/svga_context.c
+++ b/src/gallium/drivers/svga/svga_context.c
@@ -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;
+}
diff --git a/src/gallium/drivers/svga/svga_winsys.h b/src/gallium/drivers/svga/svga_winsys.h
index 27b99fe4c10..054d388c0b8 100644
--- a/src/gallium/drivers/svga/svga_winsys.h
+++ b/src/gallium/drivers/svga/svga_winsys.h
@@ -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,