iris: Fix assigning the output handle for exporting for KMS
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 13 Nov 2018 17:55:45 +0000 (17:55 +0000)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 21 Feb 2019 18:26:10 +0000 (10:26 -0800)
Fixes gbm_bo_get_handle() used for KMS in glamor.

src/gallium/drivers/iris/iris_resource.c

index 7fe13e2ed765e98bb1208ec3d2858508d3b5864f..0ea72a9075b6432f826c3ad82c8d831a37eed507 100644 (file)
@@ -498,7 +498,8 @@ iris_resource_get_handle(struct pipe_screen *pscreen,
    case WINSYS_HANDLE_TYPE_SHARED:
       return iris_bo_flink(res->bo, &whandle->handle) == 0;
    case WINSYS_HANDLE_TYPE_KMS:
-      return iris_bo_export_gem_handle(res->bo) != 0;
+      whandle->handle = iris_bo_export_gem_handle(res->bo);
+      return true;
    case WINSYS_HANDLE_TYPE_FD:
       return iris_bo_export_dmabuf(res->bo, (int *) &whandle->handle) == 0;
    }