[Mesa-dev] Where do we put a Vulkan driver?

Rob Clark robdclark at gmail.com
Tue Feb 16 19:25:30 UTC 2016


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)

So not really an answer, more an observation that I'm not really sure
that there is a right answer..

> 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
>


More information about the mesa-dev mailing list