qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Airlie <airlied@redhat.com>
To: Joe Kniss <djmk@google.com>
Cc: qemu-devel@nongnu.org, Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: [Qemu-devel] qemu+virgl on systems without dmabuf and/or GBM
Date: Mon, 13 Nov 2017 21:37:13 -0500 (EST)	[thread overview]
Message-ID: <1537413339.16131761.1510627033195.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <CAOvnNvYpQSdM5PXoBZXwf6op+FVNd3j0CPBnKGqxfa2V3pnJjA@mail.gmail.com>


Hi Joe,

> 
>   I am developing using qemu with virglrenderer on linux systems that
> do not support dmabufs or GBM.   I have been successful making this
> work using glx and ignoring egl/dmabuf/gbm use in qemu.
> Unfortunately, there is currently no way to configure qemu to use
> opengl but disable egl/dmabuf/gbm.  This use case could be handled
> with a straight-forward configure fix, but I am not sure what the
> preferred approach would be.  Here are some options for example:

I did originally write the renderer on the nvidia binary driver, but
never really continued to test it.

> 
> 1) Check for gbm in configure, if it is unavailable disable ui/egl*
> since this egl implementation depends on gbm.
> 2) Check for gbm in configure, modify ui/egl* to work when gbm is missing.
> 3) Add disable-egl flag to configure, ignore gbm package when egl is
> disabled.
> 
> For our use case, option 3 is the simplest, since we don't need either
> egl or gbm and gbm is only used with egl in qemu.  We also encountered
> an additional issue with either gtk or qemu (I forget which)
> attempting to share glx and egl contexts.
> 
> Naturally, we want to come up with a solution that is most generally
> useful,  feedback is greatly appreciated.

I'd like to make EGL work without GBM if possible, I realise you can't
do buffer sharing etc, but you should be able to get EGL contexts to
work in place of GLX contexts.

However if there are issues interoperating between SDL2/EGL/GLX, then
I think whatever approach works best. I'd rather it not be a build time
thing if at all possible, if we can detect at runtime what the installed
driver can do it would be much better.

i.e. if you build qemu+SDL2+virglrenderer against mesa, but run it against
nvidia it should work if at all possible.

Dave.

  reply	other threads:[~2017-11-14  2:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-14  0:15 [Qemu-devel] qemu+virgl on systems without dmabuf and/or GBM Joe Kniss
2017-11-14  2:37 ` David Airlie [this message]
2017-11-14  7:05 ` Gerd Hoffmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1537413339.16131761.1510627033195.JavaMail.zimbra@redhat.com \
    --to=airlied@redhat.com \
    --cc=djmk@google.com \
    --cc=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).