summaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys/i915
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/winsys/i915')
-rw-r--r--src/gallium/winsys/i915/drm/i915_drm_buffer.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/winsys/i915/drm/i915_drm_buffer.c b/src/gallium/winsys/i915/drm/i915_drm_buffer.c
index ba454ecf54c..890f7dc2833 100644
--- a/src/gallium/winsys/i915/drm/i915_drm_buffer.c
+++ b/src/gallium/winsys/i915/drm/i915_drm_buffer.c
@@ -153,6 +153,12 @@ i915_drm_buffer_get_handle(struct i915_winsys *iws,
whandle->handle = buf->flink;
} else if (whandle->type == DRM_API_HANDLE_TYPE_KMS) {
whandle->handle = buf->bo->handle;
+ } else if (whandle->type == DRM_API_HANDLE_TYPE_FD) {
+ int fd;
+
+ if (drm_intel_bo_gem_export_to_prime(buf->bo, &fd))
+ return FALSE;
+ whandle->handle = fd;
} else {
assert(!"unknown usage");
return FALSE;