diff options
author | Marc-André Lureau <[email protected]> | 2015-06-15 14:48:27 +0200 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2018-05-30 09:11:54 +1000 |
commit | 9feaf333716f08111ac8a921940e3a0e3666df0e (patch) | |
tree | 1cc0b43758acf137980d434b739af0904b1fdf6d /src/gallium/winsys/sw/dri | |
parent | bcd80be49a8260c2233dd07b2048d459a91a9c91 (diff) |
drisw: learn to query shmid handle type
Reviewed-by: Dave Airlie <[email protected]>
Reviewed-by: Adam Jackson <[email protected]>
Diffstat (limited to 'src/gallium/winsys/sw/dri')
-rw-r--r-- | src/gallium/winsys/sw/dri/dri_sw_winsys.c | 10 |
1 files changed, 9 insertions, 1 deletions
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; } |