From: Eduardo Lima Mitev Date: Tue, 7 Apr 2020 06:54:16 +0000 (+0200) Subject: freedreno: Enable GL_EXT_memory_object and GL_EXT_memory_object_fd X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f6187aa1c3506a75d55fd7966a7314785f7bff77;p=mesa.git freedreno: Enable GL_EXT_memory_object and GL_EXT_memory_object_fd Reviewed-by: Rob Clark Part-of: --- diff --git a/src/freedreno/drm/freedreno_drmif.h b/src/freedreno/drm/freedreno_drmif.h index a14ab60cf7c..15038475e74 100644 --- a/src/freedreno/drm/freedreno_drmif.h +++ b/src/freedreno/drm/freedreno_drmif.h @@ -94,6 +94,7 @@ enum fd_version { FD_VERSION_BO_IOVA = 3, /* supports fd_bo_get/put_iova() */ FD_VERSION_SOFTPIN = 4, /* adds softpin, bo name, and dump flag */ FD_VERSION_ROBUSTNESS = 5, /* adds FD_NR_FAULTS and FD_PP_PGTABLE */ + FD_VERSION_MEMORY_FD = 2, /* supports shared memory objects */ }; enum fd_version fd_device_version(struct fd_device *dev); diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c b/src/gallium/drivers/freedreno/freedreno_screen.c index 0cd76f8dd50..9f0867ba83a 100644 --- a/src/gallium/drivers/freedreno/freedreno_screen.c +++ b/src/gallium/drivers/freedreno/freedreno_screen.c @@ -453,6 +453,8 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param) return 10; case PIPE_CAP_UMA: return 1; + case PIPE_CAP_MEMOBJ: + return fd_device_version(screen->dev) >= FD_VERSION_MEMORY_FD; case PIPE_CAP_NATIVE_FENCE_FD: return fd_device_version(screen->dev) >= FD_VERSION_FENCE_FD; default: