From 9feaf333716f08111ac8a921940e3a0e3666df0e Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Mon, 15 Jun 2015 14:48:27 +0200 Subject: drisw: learn to query shmid handle type Reviewed-by: Dave Airlie Reviewed-by: Adam Jackson --- src/gallium/winsys/sw/dri/dri_sw_winsys.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/gallium/winsys/sw/dri') diff --git a/src/gallium/winsys/sw/dri/dri_sw_winsys.c b/src/gallium/winsys/sw/dri/dri_sw_winsys.c index b36a53e960c..8335e52200f 100644 --- a/src/gallium/winsys/sw/dri/dri_sw_winsys.c +++ b/src/gallium/winsys/sw/dri/dri_sw_winsys.c @@ -209,7 +209,15 @@ dri_sw_displaytarget_get_handle(struct sw_winsys *winsys, struct sw_displaytarget *dt, struct winsys_handle *whandle) { - assert(0); + struct dri_sw_displaytarget *dri_sw_dt = dri_sw_displaytarget(dt); + + if (whandle->type == WINSYS_HANDLE_TYPE_SHMID) { + if (dri_sw_dt->shmid < 0) + return FALSE; + whandle->handle = dri_sw_dt->shmid; + return TRUE; + } + return FALSE; } -- cgit v1.2.3