Mesa (master): svga: Add a winsys callback to get the svga_winsys_context

Jakob Bornecrantz wallbraker at kemper.freedesktop.org
Tue Jun 1 09:39:01 PDT 2010


Module: Mesa
Branch: master
Commit: cd151effe654c460c46ba55780eb89b3072077c0
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=cd151effe654c460c46ba55780eb89b3072077c0

Author: Thomas Hellstrom <thellstrom at vmware.com>
Date:   Mon May 31 22:03:56 2010 +0100

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.

Cherry-picked from commit e8a8c5e339dfd7a36bb6435fd34175482b9187b8

Signed-off-by: Thomas Hellstrom <thellstrom at vmware.com>
Signed-off-by: Jakob Bornecrantz <jakob at vmware.com>

---

 src/gallium/drivers/svga/svga_context.c |    5 +++++
 src/gallium/drivers/svga/svga_winsys.h  |    3 +++
 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 75d8afb..3b30b9e 100644
--- a/src/gallium/drivers/svga/svga_context.c
+++ b/src/gallium/drivers/svga/svga_context.c
@@ -239,3 +239,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 c155f5d..a2dcc84 100644
--- a/src/gallium/drivers/svga/svga_winsys.h
+++ b/src/gallium/drivers/svga/svga_winsys.h
@@ -294,6 +294,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_resource *
 svga_screen_buffer_wrap_surface(struct pipe_screen *screen,
 				enum SVGA3dSurfaceFormat format,



More information about the mesa-commit mailing list