Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to run Vulkan applications with Mesa on Windows? #63

Open
retrooper opened this issue May 5, 2021 · 12 comments
Open

How to run Vulkan applications with Mesa on Windows? #63

retrooper opened this issue May 5, 2021 · 12 comments

Comments

@retrooper
Copy link

The main reason I want to use Mesa drivers on windows, is so I can run vulkan applications. I will always get a "vulkan-1.dll not found", because my Intel drivers have not implemented Vulkan support. On linux mesa drivers were easy to setup and I can run all types of applications. I tried extracting the mesa3d-msvc zip in the releases section, ran the "perappdeploy.cmd" script, and it only seemed to make OpenGL drivers available. How can I use vulkan drivers, and can we just add vulkan-1.dll inside my System folder on windows so all applications can use it, cause I don't have any vulkan drivers. I want all vulkan applications to use Mesa.

@retrooper
Copy link
Author

I don't only want to be able to run vulkan applications, I want to do vulkan application development myself. I am doing it on linux atm, thats the main reason I switched over to linux, but I want to switch back to windows.

@retrooper retrooper changed the title How to run Vulkan applications on Windows? How to run Vulkan applications with Mesa on Windows? May 5, 2021
@pal1000
Copy link
Owner

pal1000 commented May 5, 2021

You have to install Vulkan runtime first, then you can either point VK_ICD_FILENAMES to lavapipe JSON or create Vulkan slots to your GPU driver. See Vulkan ICD discovery documentation.

@retrooper
Copy link
Author

retrooper commented May 5, 2021

How can I install vulkan-swrast(lavapipe) on Windows?

@pal1000
Copy link
Owner

pal1000 commented May 5, 2021

You can try 21.1-rc1 MSVC package. It contains x64 lavapipe. Extract it and then follow the instructions from my last comment. Note that you won't find lavapipe in 21.0.3 or in 21.1-rc1 MinGW package. I may consider making another Mesa 21.1 release candidate once this fix gets incorporated.

@retrooper
Copy link
Author

Wait will it then end up using my CPU instead, as it seems like its a CPU implementation, id prefer if it used my GPU tho

@pal1000
Copy link
Owner

pal1000 commented May 6, 2021

Unfortunately on hardware acceleration front only RADV AMD GPU Vulkan driver has Windows support, but it won't be available until 21.2 and it's not in a usable state yet.

@retrooper
Copy link
Author

So CPU is my only option on Windows? If thats the case, I think I'll have to scratch my plan of moving to windows.

@Calinou
Copy link

Calinou commented Jun 13, 2022

I'm encountering a similar issue when trying to run Godot 4.0alpha in a Windows 7 64-bit VM1 (which requires both Vulkan and OpenGL libraries to be installed). 3D acceleration is disabled in the VirtualBox settings, but guest additions are installed.

I've installed the Vulkan SDK 1.3.211.0 and mesa-dist-win 22.1.1 (MinGW). I've tried system-wide deployment and rebooted, but it didn't work, even for OpenGL-only applications like Sauerbraten.

I went and tried manual local deployment instead, to no avail:

  • I placed opengl32.dll, libgallium_wgl.dll, vulkan_lvp.dll and lvp_icd.x86_64.json in the same folder as the executable I'm trying to run.
  • I open a command prompt, cd to the folder in question and run: set VK_ICD_FILENAMES=C:\Users\Hugo\Downloads\lvp_icd.x86_64.json
  • I run the executable in the command prompt.
  • I get this error: "The program can't start because vulkan-1.dll is missing from your computer. …"

Footnotes

  1. I can't use Windows 10 or later here, as I'm testing behavior of specific code on Windows versions older than 10. I could use a Windows 8.1 VM if it's the only solution, still.

@pal1000
Copy link
Owner

pal1000 commented Jun 14, 2022

@Calinou see my comment above.

@TherealGenius
Copy link

for resolve this part you will need vulkan runtime

the vulkan-1.dll is located inside this file both for x32 and x64
VulkanRT-1.3.216.0-Components.zip

just extract the right x32 or x64 version of the vulkan-1.dll and put it inside
C:\Users\Hugo\Downloads\

@stupid-kid-af
Copy link

This could be helpful

@Calinou
Copy link

Calinou commented Jun 21, 2022

This could be helpful

This isn't relevant for use within a virtual machine where there is no actual graphics accelerator to speak of.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants