gallium: Add dmabuf arg to memory fd allocation API

Modify the memory fd allocation API to provide an argument to specify
if the allocating fd should be a dmabuf.

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27805>
This commit is contained in:
Lucas Fryzek
2024-02-26 17:12:11 -05:00
committed by Marge Bot
parent e4ae665f93
commit 7e5c5d313b
4 changed files with 15 additions and 9 deletions
+4 -2
View File
@@ -667,7 +667,8 @@ struct pipe_screen {
*/
struct pipe_memory_allocation *(*allocate_memory_fd)(struct pipe_screen *screen,
uint64_t size,
int *fd);
int *fd,
bool dmabuf);
/**
* Import memory from an fd-handle.
@@ -675,7 +676,8 @@ struct pipe_screen {
bool (*import_memory_fd)(struct pipe_screen *screen,
int fd,
struct pipe_memory_allocation **pmem,
uint64_t *size);
uint64_t *size,
bool dmabuf);
/**
* Free previously allocated fd-based memory.