On 23 November 2016 at 21:13, Mike Lothian <m...@fireburn.co.uk> wrote: > I think it would be good to keep the DRI_PRIME switch to allow for switching > between anvil and radv, handy for testing / comparing / benchmarking both > > It seems that Vulkan automatically uses the first card listed in vulkaninfo > (in my case it's the amdgpu card) with no way to select which is used, hence > why I've only been seeing garbage since the radv driver was added into mesa > > If DRI_PRIME=0 is passed will this now automatically use anvil? > Unfortunately DRI_PRIME semantics won't work with vulkan at all, what I've done here is a pretty big hack.
The problem is the generic vulkan loader loads all the available ICDs, which enumerate all the devices themselves. So in theory to make DRI_PRIME work I'd have to change the loader, but using DRI_PRIME in the loader doesn't make much sense, even less sense is using the ID tag unfortunately, as the loader has no such knowledge. I'm contemplating making a vulkan layer to reorder the output from enumeration along with some user selected env var (ideally apps would do this). So I doubt the actual answer is going to involve DRI_PRIME working with vulkan at all unfortunately. Dave. _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev