diff options
Diffstat (limited to 'src/mesa/drivers/dri/i965/intel_screen.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_screen.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c index 3d6551ec516..7d6b795e5b5 100644 --- a/src/mesa/drivers/dri/i965/intel_screen.c +++ b/src/mesa/drivers/dri/i965/intel_screen.c @@ -901,9 +901,16 @@ intel_query_image(__DRIimage *image, int attrib, int *value) case __DRI_IMAGE_ATTRIB_STRIDE: *value = image->pitch; return true; - case __DRI_IMAGE_ATTRIB_HANDLE: - *value = brw_bo_export_gem_handle(image->bo); + case __DRI_IMAGE_ATTRIB_HANDLE: { + __DRIscreen *dri_screen = image->screen->driScrnPriv; + uint32_t handle; + if (brw_bo_export_gem_handle_for_device(image->bo, + dri_screen->fd, + &handle)) + return false; + *value = handle; return true; + } case __DRI_IMAGE_ATTRIB_NAME: return !brw_bo_flink(image->bo, (uint32_t *) value); case __DRI_IMAGE_ATTRIB_FORMAT: |