diff --git a/src/venus/vkr_context.c b/src/venus/vkr_context.c index 4eef830..9ac5607 100644 --- a/src/venus/vkr_context.c +++ b/src/venus/vkr_context.c @@ -527,13 +527,6 @@ vkr_context_attach_resource_locked(struct virgl_context *base, struct virgl_reso } } - /* TODO When in multi-process mode, we cannot share a virgl_resource as-is - * to another process. The resource must have a valid fd, and only the fd - * and the iov can be sent the other process. - * - * For vrend-to-vkr sharing, we can get the fd from pipe_resource. - */ - att->resource = res; list_inithead(&att->memories); @@ -700,8 +693,6 @@ vkr_context_create(size_t debug_len, const char *debug_name) { struct vkr_context *ctx; - /* TODO inject a proxy context when multi-process */ - ctx = calloc(1, sizeof(*ctx)); if (!ctx) return NULL; diff --git a/src/venus/vkr_renderer.c b/src/venus/vkr_renderer.c index afd8248..2ad7143 100644 --- a/src/venus/vkr_renderer.c +++ b/src/venus/vkr_renderer.c @@ -29,7 +29,8 @@ vkr_get_capset(void *capset) vn_info_extension_spec_version("VK_EXT_command_serialization"); c->vk_mesa_venus_protocol_spec_version = vn_info_extension_spec_version("VK_MESA_venus_protocol"); - c->supports_blob_id_0 = true; + /* TODO always true once Mesa resolves its performance issue */ + c->supports_blob_id_0 = (bool)(vkr_renderer_flags & VKR_RENDERER_RENDER_SERVER); } return sizeof(*c); @@ -38,8 +39,6 @@ vkr_get_capset(void *capset) int vkr_renderer_init(uint32_t flags) { - /* TODO VKR_RENDERER_MULTI_PROCESS hint */ - if ((vkr_renderer_flags & VKR_RENDERER_ASYNC_FENCE_CB) && !(vkr_renderer_flags & VKR_RENDERER_THREAD_SYNC)) return -EINVAL; diff --git a/src/venus/vkr_renderer.h b/src/venus/vkr_renderer.h index b36bccb..1a3849a 100644 --- a/src/venus/vkr_renderer.h +++ b/src/venus/vkr_renderer.h @@ -15,8 +15,8 @@ #include "virgl_util.h" #define VKR_RENDERER_THREAD_SYNC (1u << 0) -#define VKR_RENDERER_MULTI_PROCESS (1u << 1) -#define VKR_RENDERER_ASYNC_FENCE_CB (1u << 2) +#define VKR_RENDERER_ASYNC_FENCE_CB (1u << 1) +#define VKR_RENDERER_RENDER_SERVER (1u << 2) struct virgl_context; diff --git a/src/virglrenderer.c b/src/virglrenderer.c index 98f3777..1f37fd9 100644 --- a/src/virglrenderer.c +++ b/src/virglrenderer.c @@ -706,6 +706,8 @@ int virgl_renderer_init(void *cookie, int flags, struct virgl_renderer_callbacks vkr_flags |= VKR_RENDERER_THREAD_SYNC; if (flags & VIRGL_RENDERER_ASYNC_FENCE_CB) vkr_flags |= VKR_RENDERER_ASYNC_FENCE_CB; + if (flags & VIRGL_RENDERER_RENDER_SERVER) + vkr_flags |= VKR_RENDERER_RENDER_SERVER; ret = vkr_renderer_init(vkr_flags); if (ret)