sw/wrapper: Implement dt_get_handle
authorJakob Bornecrantz <wallbraker@gmail.com>
Sun, 16 May 2010 01:41:52 +0000 (02:41 +0100)
committerJakob Bornecrantz <wallbraker@gmail.com>
Sun, 16 May 2010 11:22:19 +0000 (12:22 +0100)
src/gallium/winsys/sw/wrapper/wrapper_sw_winsys.c

index b63a5c0c0ed0d08e3ebf6fae51fbd04b48b098de..b997abda9b0724dd8f394d79fd844b55893f5ed9 100644 (file)
@@ -176,6 +176,18 @@ wsw_dt_from_handle(struct sw_winsys *ws,
    return wsw_dt_wrap_texture(wsw, tex, stride);
 }
 
+static boolean
+wsw_dt_get_handle(struct sw_winsys *ws,
+                  struct sw_displaytarget *dt,
+                  struct winsys_handle *whandle)
+{
+   struct wrapper_sw_winsys *wsw = wrapper_sw_winsys(ws);
+   struct wrapper_sw_displaytarget *wdt = wrapper_sw_displaytarget(dt);
+   struct pipe_resource *tex = wdt->tex;
+
+   return wsw->screen->resource_get_handle(wsw->screen, tex, whandle);
+}
+
 static void *
 wsw_dt_map(struct sw_winsys *ws,
            struct sw_displaytarget *dt,
@@ -268,6 +280,7 @@ wrapper_sw_winsys_warp_pipe_screen(struct pipe_screen *screen)
 
    wsw->base.displaytarget_create = wsw_dt_create;
    wsw->base.displaytarget_from_handle = wsw_dt_from_handle;
+   wsw->base.displaytarget_get_handle = wsw_dt_get_handle;
    wsw->base.displaytarget_map = wsw_dt_map;
    wsw->base.displaytarget_unmap = wsw_dt_unmap;
    wsw->base.displaytarget_destroy = wsw_dt_destroy;