diff options
author | Rob Clark <[email protected]> | 2015-09-03 14:53:03 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2015-09-09 11:24:56 -0400 |
commit | 30a915bd174a4a4dd950870eca19dde45bbd524b (patch) | |
tree | ec3ed1ce8b91e5e4464d1cbfa4b57ce3ebf2c853 /src/gallium/include/pipe | |
parent | c12ffb30b4a53eda55ef8f541b760c309c488e66 (diff) |
gallium/docs: clairify dmabuf fd ownership
Since debugging issues w/ fd's close()d at the wrong time can be quite
fun, this should probably be made more explicit in the docs.
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/include/pipe')
-rw-r--r-- | src/gallium/include/pipe/p_screen.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/include/pipe/p_screen.h b/src/gallium/include/pipe/p_screen.h index a7b7b72ac89..a22fb938dbb 100644 --- a/src/gallium/include/pipe/p_screen.h +++ b/src/gallium/include/pipe/p_screen.h @@ -173,6 +173,10 @@ struct pipe_screen { * Create a texture from a winsys_handle. The handle is often created in * another process by first creating a pipe texture and then calling * resource_get_handle. + * + * NOTE: in the case of DRM_API_HANDLE_TYPE_FD handles, the caller + * retains ownership of the FD. (This is consistent with + * EGL_EXT_image_dma_buf_import) */ struct pipe_resource * (*resource_from_handle)(struct pipe_screen *, const struct pipe_resource *templat, @@ -190,6 +194,10 @@ struct pipe_screen { * Get a winsys_handle from a texture. Some platforms/winsys requires * that the texture is created with a special usage flag like * DISPLAYTARGET or PRIMARY. + * + * NOTE: in the case of DRM_API_HANDLE_TYPE_FD handles, the caller + * takes ownership of the FD. (This is consistent with + * EGL_MESA_image_dma_buf_export) */ boolean (*resource_get_handle)(struct pipe_screen *, struct pipe_resource *tex, |