Thanks everyone for the prompt responses and ideas, really appreciate it. I got 
lavapipe to work after building LLVM manually.
To close this thread, here are the steps I used:
- Build LLVM <llvm-installed>
- Download/install <flexbison>
- Download/Install <DX12 headers> (from 
https://github.com/microsoft/DirectX-Headers/releases/tag/v1.611.0)

set INCLUDE=%INCLUDE%;<DX12Headers>\include
set PATH=%PATH%;<llvm-installed\bin>;<flexbison>
meson setup -D llvm=enabled --prefix=%CD%/build/install build/  
--buildtype=release -Dgallium-drivers=swrast -Dvulkan-drivers=swrast
cd build
ninja -C .
ninja -C . install

Thanks
Ashwin


From: Lucas Fryzek <lfry...@igalia.com>
Sent: Thursday, February 8, 2024 9:10 PM
To: Dave Airlie <airl...@gmail.com>
Cc: Ashwin Bhat <ashwin.b...@autodesk.com>; mesa-dev@lists.freedesktop.org
Subject: Re: Getting started with Lavapipe

You don't often get email from lfry...@igalia.com<mailto:lfry...@igalia.com>. 
Learn why this is important<https://aka.ms/LearnAboutSenderIdentification>

EXTERNAL EMAIL : Do not click any links or open any attachments unless you 
trust the sender and know the content is safe.

Adding on to what Dave shared. From a quick Google the problem seems to be that 
the LLVM installer [1] on windows doesn't ship the "llvm-config" tool which 
meson uses to find the LLVM libraries. Looking at the build instructions [2] 
from Dave's link they are building LLVM from source presumably to build with 
support for the llvm-config tool.

I don't have a windows machine on me to check at the moment. But if the LLVM 
installer ships cmake files it might be possible to point the 
CMAKE_MODULES_PATH environment variable to those files to also solve this 
problem.

I assume you're using MSVC to build, but if you're not and instead using msys2 
it looks like you can probably just install the LLVM package in that and have 
access to llvm-config.

[1] https://stackoverflow.com/questions/17096804/where-is-llvm-config-in-windows
[2] https://github.com/pal1000/mesa-dist-win/tree/master/buildscript


On Feb 8, 2024 11:46 PM, Dave Airlie 
<airl...@gmail.com<mailto:airl...@gmail.com>> wrote:

On Fri, 9 Feb 2024 at 14:38, Ashwin Bhat 
<ashwin.b...@autodesk.com<mailto:ashwin.b...@autodesk.com>> wrote:
>
> Hello,
>
> During  Vulkanised 2024 I was super excited to hear and learn about Lavapipe
> https://vulkan.org/user/pages/09.events/vulkanised-2024/Vulkanised-2024-faith-ekstrand-collabora-Iago-toral-igalia.pdf
>
> Are there some basic tutorials on how to get started with setting up Lavapipe 
> swrast on Windows?
>
> I've installed LLVM and ensured it's in path. I have been trying to build 
> using meson but haven't had much success. Any pointers appreciated. Please 
> let me know if it's preferred to move this discussion/thread to issues.
>
> Here is the command I'm trying to run:
> meson setup -D llvm=true --prefix=%CD%/build/install build/  
> --buildtype=release -Dgallium-drivers=swrast -Dvulkan-drivers=swrast
>
> But I get this error:
> llvm-config found: NO need ['>= 5.0.0']
> Run-time dependency LLVM found: NO (tried cmake and config-tool)
> Looking for a fallback subproject for the dependency llvm (modules: 
> bitwriter, engine, mcdisassembler, mcjit, core, executionengine, scalaropts, 
> transformutils, instcombine, native)
> Building fallback subproject with default_library=static
>
> meson.build:1748:13: ERROR: Neither a subproject directory nor a llvm.wrap 
> file was found.

I haven't used it on Windows in a long time, but there are prebuilds

https://github.com/pal1000/mesa-dist-win

They might also help start off but also figure out what is missing in
llvm builds.

Dave.

Reply via email to