[virglrenderer-devel] multiprocess model and GL
Gerd Hoffmann
kraxel at redhat.com
Tue Feb 11 14:59:01 UTC 2020
Hi,
> > The vulkan driver has object ids though, and trying to hide that creates
> > a bunch of limitations. For example it forces creating object and
> > resource at the same time.
>
> You mean it forces allocation and resource creation to occur at the
> same time? No.
> Essentially, there's three commands we can put in the command buffer:
>
> (1) ALLOCATE
> (2) ASSIGN_OBJ_ID (setup [obj_id] --> [struct resource] mapping)
> (3) GET_OBJ_ID (lookup [obj_id] --> [struct resource] mapping)
>
> Right now, VIRTIO_GPU_CMD_SUBMIT_3D does (1) and (2) [ASSIGN_OBJ_ID is
> implicit in the command buffer].
(1) and (2) are not separate steps. You need some way to address your
object, and obj_id provides exactly that.
> virgl_renderer_resource_create_blob(resid, size, flags, obj_id)
> essentially does (3).
Yes, and establish res_id -> struct resource mapping.
> With virgl_renderer_resource_create_blob(resid, size, flags, void
> *resource_create_3d, int ndw, ..):
>
> - setup [res_id] --> [struct resource] from a prior object via (3),
Hmm, how do you want find your resource here when it has no obj_id?
> - allocate and setup [res_id] --> [struct resource] only via (1)
> - allocate and setup both [res_id] --> [struct resource], [obj_id]
> --> [struct resource] mapping via (1) and (2)
>
> All user space has to do is specify the right command buffer (which
> should be less than 64 bytes).
How does userspace figure the res_id?
cheers,
Gerd
More information about the virglrenderer-devel
mailing list