[Mesa-dev] Where do we put a Vulkan driver?
Jason Ekstrand
jason at jlekstrand.net
Tue Feb 16 19:33:07 UTC 2016
On Tue, Feb 16, 2016 at 11:25 AM, Rob Clark <robdclark at gmail.com> wrote:
> On Tue, Feb 16, 2016 at 1:39 PM, Jason Ekstrand <jason at jlekstrand.net>
> wrote:
> > So, we just pushed a branch containing a Vulkan driver. Naturally, we
> > would like to incorporate that driver into the upstream mesa tree. While
> > we work on upstreaming the prerequisites in NIR and the i965 back-end
> > compiler, there is a question that needs answering: Where do we put it?
> >
> > The Vulkan driver challenges the tree-like nature of the way mesa is
> > currently organized. We now have two drivers that share a lot of the
> same
> > underlying hardware-specific code (compiler and ISL) but target different
> > APIs and no gallium-like middle layer to hide behind. Obviously, we
> don't
> > want to put a Vulkan driver in src/mesa/drivers/dri/i965. If we start a
> > src/vulkan directory, we don't really want to put the shared parts into
> > src/vulkan/intel. Where should we put the Intel-specific but
> API-agnostic
> > bits? In particular, we need a place to put ISL and the back-end
> compiler.
> > We don't want to deal with the headaches of making a public API and
> keeping
> > it stable, so they need to live somewhere in the mesa tree.
> >
> > In my personal opinion, the best thing to do is probably to add a
> src/intel
> > folder with subfolders for vulkan, isl, and the back-end compiler. The
> > src/mesa/drivers/dri/i965 folder would then basically be just the GL bits
> > of the driver. It does seem a little odd to have "intel" as a top-level
> > source folder, but I can't come up with anything better.
>
> Some day (ie. not near-term future) I'd like to share ir3 compiler
> backend between vulkan and gallium.. and I think there it is even less
> clear how to arrange things. Perhaps in an ideal world, gl-on-vulkan
> could replace gallium / mesa-st.. although I'm not even sure how that
> would work.. even if it didn't give up some features/performance, I
> have a lot of shared code between adreno generations that can support
> vulkan (a4xx, and possibly a5xx) and which can not (a3xx)
>
I think it's best to assume, for the sake of these discussions, that
GL-on-vulkan isn't going to happen, at least not for quite some time. It's
theoretically possible but a lot of work and it's not clear what the
performance will be. For now, GL and Vulkan drivers will likely be
separate things (with shared code).
So not really an answer, more an observation that I'm not really sure
> that there is a right answer..
>
Neither do I/we. That's why I sent the e-mail. :-)
> > Thoughts? Opinions? Favorite colors?
>
> blue, no red... arrrgghhh..
>
> BR,
> -R
>
> > --Jason
> >
> >
> > _______________________________________________
> > mesa-dev mailing list
> > mesa-dev at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/mesa-dev
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160216/327da53a/attachment.html>
More information about the mesa-dev
mailing list