summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/brw_bufmgr.c8
-rw-r--r--src/mesa/drivers/dri/i965/brw_bufmgr.h2
-rw-r--r--src/mesa/drivers/dri/i965/intel_screen.c2
3 files changed, 11 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_bufmgr.c b/src/mesa/drivers/dri/i965/brw_bufmgr.c
index 60b0dad2be7..2e5e0aa5d11 100644
--- a/src/mesa/drivers/dri/i965/brw_bufmgr.c
+++ b/src/mesa/drivers/dri/i965/brw_bufmgr.c
@@ -1208,6 +1208,14 @@ brw_bo_gem_export_to_prime(struct brw_bo *bo, int *prime_fd)
return 0;
}
+uint32_t
+brw_bo_export_gem_handle(struct brw_bo *bo)
+{
+ brw_bo_make_external(bo);
+
+ return bo->gem_handle;
+}
+
int
brw_bo_flink(struct brw_bo *bo, uint32_t *name)
{
diff --git a/src/mesa/drivers/dri/i965/brw_bufmgr.h b/src/mesa/drivers/dri/i965/brw_bufmgr.h
index ee913240432..0ae541cda0d 100644
--- a/src/mesa/drivers/dri/i965/brw_bufmgr.h
+++ b/src/mesa/drivers/dri/i965/brw_bufmgr.h
@@ -337,6 +337,8 @@ int brw_bo_gem_export_to_prime(struct brw_bo *bo, int *prime_fd);
struct brw_bo *brw_bo_gem_create_from_prime(struct brw_bufmgr *bufmgr,
int prime_fd);
+uint32_t brw_bo_export_gem_handle(struct brw_bo *bo);
+
int brw_reg_read(struct brw_bufmgr *bufmgr, uint32_t offset,
uint64_t *result);
diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c
index 4e48a856050..38769babf0c 100644
--- a/src/mesa/drivers/dri/i965/intel_screen.c
+++ b/src/mesa/drivers/dri/i965/intel_screen.c
@@ -835,7 +835,7 @@ intel_query_image(__DRIimage *image, int attrib, int *value)
*value = image->pitch;
return true;
case __DRI_IMAGE_ATTRIB_HANDLE:
- *value = image->bo->gem_handle;
+ *value = brw_bo_export_gem_handle(image->bo);
return true;
case __DRI_IMAGE_ATTRIB_NAME:
return !brw_bo_flink(image->bo, (uint32_t *) value);