[virglrenderer-devel] multiprocess model and GL

Gerd Hoffmann kraxel at redhat.com
Mon Feb 3 10:17:08 UTC 2020


  Hi,

> > > virgl_renderer_submit_cmd (allocate and store away something)
> > > virgl_renderer_resource_init (get that something just to setup
> > > res_id->resource map)
> >
> > Why do you think multiple function calls should be avoided?
> 
> It makes the userspace nicer.

Not sure about that.  Having one function per job which you can freely
combine as needed tends to work better than a single does-everything
function.

> For example, it's nice to have the
> guest SG backing and the metadata when creating a udmabuf.

Well, yes, doing the backing store as separate step has its problems
indeed.  With a shadow buffer and transfer calls this isn't much of a
problem, but with udmabufs it kind-of sucks.

Not sure why the initial design had a separate ATTACH_BACKING virtio
command.  Maybe the idea was that you don't have to attach backing
storage to objects which you never touch with the CPU.  The linux kernel
attaches backing storage to all resources unconditionally though, and
the future plan for device-only objects is that we don't create
virtio-gpu resources in the first place.  So that point is moot I think.

Does it make sense to pass the scatter list at resource creation time
(for SHADOW+SHARED objects)?

cheers,
  Gerd



More information about the virglrenderer-devel mailing list