From 9189e19676f63e6bd3c571a901c3a79f56423e3b Mon Sep 17 00:00:00 2001 From: David Riley Date: Wed, 12 Jun 2019 14:13:13 -0700 Subject: [PATCH] virglrenderer: Add VIRGL_RES_BIND_SHARED bind flag. Allow external users to intercept resource creation based on shared bind flag. Signed-off-by: David Riley Reviewed-By: Gert Wollny --- src/virgl_hw.h | 1 + src/virglrenderer.h | 1 + 2 files changed, 2 insertions(+) diff --git a/src/virgl_hw.h b/src/virgl_hw.h index 7a8aa12..ab53b76 100644 --- a/src/virgl_hw.h +++ b/src/virgl_hw.h @@ -271,6 +271,7 @@ enum virgl_formats { * are only read by the host. */ #define VIRGL_BIND_STAGING (1 << 19) +#define VIRGL_BIND_SHARED (1 << 20) struct virgl_caps_bool_set1 { unsigned indep_blend_enable:1; diff --git a/src/virglrenderer.h b/src/virglrenderer.h index 03e842e..dbf0675 100644 --- a/src/virglrenderer.h +++ b/src/virglrenderer.h @@ -96,6 +96,7 @@ VIRGL_EXPORT int virgl_renderer_get_fd_for_texture2(uint32_t tex_id, int *fd, in #define VIRGL_RES_BIND_CURSOR (1 << 16) #define VIRGL_RES_BIND_CUSTOM (1 << 17) #define VIRGL_RES_BIND_SCANOUT (1 << 18) +#define VIRGL_RES_BIND_SHARED (1 << 20) struct virgl_renderer_resource_create_args { uint32_t handle;