On Tue, Feb 16, 2016 at 11:36 PM, Jose Fonseca <[email protected]> wrote: > On 16/02/16 22:19, Brian Paul wrote: >> >> On 02/16/2016 02:41 PM, Dave Airlie wrote: >>> >>> On 17 February 2016 at 04:39, Jason Ekstrand <[email protected]> >>> 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. >>>> >>>> Thoughts? Opinions? Favorite colors? >>> >>> >>> I don't think we'll get this right the first time, and when we >>> randomly decide to >>> change it we can just make poor Emil handle the fallout. :-P >>> >>> Anyways, >>> >>> src/intel works for me, also src/shed/intel, src/shared/intel, >>> src/drivers/intel >> >> >> I like src/shared/intel/ FWIW. >> >> -Brian > > > Me too FWIW. We could also consider putting all non-GL/Gallium/Vulkan > specific stuff in src/shared too, like src/util, nir, etc.
We do have a few pieces that are intel-specific that we'd want to share with the GL driver, so I don't feel that src/shared is necessarily the best place. I'd prefer something like src/intel/isl, src/intel/compiler, src/intel/genxml and src/intel/vulkan. You could say that we should put out intel compiler backend in src/compiler/intel and perhaps the vulkan API in src/vulkan/intel, but the other pieces are intel specific helper libraries that don't really fit under any other umbrella. Kristian > But like Dave said, we can always tweak these things later. > > Congrats on getting 0-day Vulkan support BTW! > > Jose > > _______________________________________________ > mesa-dev mailing list > [email protected] > https://lists.freedesktop.org/mailman/listinfo/mesa-dev _______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
