-
Notifications
You must be signed in to change notification settings - Fork 387
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
Virtio-gpu-gl through already existing Windows Mesa Driver #841
Comments
Hi Luca, Sorry for the late reply, had some public holidays. Yes, in general this is something achievable, But will need some effort. Do you want to work on it and need some guidance? Best regards, |
Hi Yan I would like to try to work on it on spare time I'm experienced c++20 programmer (mostly baremetal) and IT admin but I'm getting a bit lost on the implementation details (with missing or hidden documentation). Here is as I understood a possible complete architecture: From what I get full Mesa already support a virtio-gpu and I think the gallium conversion is here On your side code I did't deep dive into it yet but seem like you already exposing virtio-gpu-gl as a pcie device and in the header the are definitions for 3D commands What I'm missing? Thanks, |
@imwhocodes You can take a look at https://studiopixl.com/page3/ . But you need to understand that due to luck of Rendering Driver Cheers, |
Hi Vadim Nathan Gauër blog and Talks were the first thing I checked out before opening this issue, referencing to his work this is what I mean about virtual PCIE Actually I just realised checking out the ICD repo that the author himself is saying:
and from what I get ICD was the most underdeveloped part On the DoD Driver side it seem like only an extension of the current VirtioGPU code present in this repo (it should only move buffer around between Host and Guest) |
@YanVugenfirer Do you have any clarification or hints? Thanks |
I wonder if it might even wind up being easier to use vitio-gpu venus? I realize that it still isn't merged into qemu so there might not be a lot you can actually do on that end right now but the patches are being worked on. I wonder if it might be easier to get vulkan acceleration in the guest then it would be opengl via venus. also it might not be too bad to try and port D3D10UMD to NIR from TGSI to try and get that working with virgl, or even zink if the vulkan route could wind up proving more beneficial, (I assume that the performance would be better at the very least). and if that does work I believe from there it can be extended to d3d11. IIRC that should be able to provide desktop acceleration. well regardless, another resource is a talk that I think was from 2020? it was something called virgl and windows if I am remembering it correctly. that could be a good chunk information there. EDIT: some potentially useful resources. https://www.youtube.com/watch?v=aBgYNDLXuyg |
@imwhocodes Hi Luca, I think while ICD can be most probably done with not much effort by reusing Mesa and other existing projects, I think this is a least interesting part. Best regards, |
Wanted to pop in and give some bits of info.
DXVK and VKD3D don't officially support Windows (only Linux/Wine) so you'd have to provide support for any bugs that occur there, though that could be useful for improving the projects if you were to fix the bugs and upstream them. |
Sure. That's the usual mode of operation for us - if needed we fix issues in other projects and upstream them. |
Could something like microsoft's gpu-pv easier? |
Doesn't really seem to have anything useful to offer as it seems to just expose Windows specific features to the guest, and it heavily relies on closed source blobs both on the host and the guest side. |
@voidpointertonull @YanVugenfirer @orowith2o One other option could be wait for RADV Native context to land |
Any updates regarding this feature? It would be a nice addition to qemu/kvm (which virtio is a part of), if it supported DirectX 3d acceleration like vmware workstation or virtualbox. There is project on github, which runs 3d acceleration for Direct3D to DirectX 9.0c games to run on older versions of Windows (Windows 9x, Windows 2000 and Windows XP) in qemu: https://github.com/kjliew/qemu-3dfx. You could provide a similar feature, but for modern Windows (Windows 7 and later). There should be an option in virtio, because not every system supports multiple gpu for pass through and many gpu models do not support virtualization: https://wiki.archlinux.org/title/QEMU/Guest_graphics_acceleration |
I think the chances of this supporting Windows 7/8/8.1 are minimal since they are legacy systems, and this project is only focusing on development for recent versions of Windows 10/11. But still I think it would be a good addition to the project, some Windows programs need 3D acceleration to work and Windows itself will be more responsive with that, and 3D acceleration already is supported on other platforms such as VirtualBox and VMware Workstation. Obviously it would not be aimed to gaming, Wine is very well suited at the moment for Windows XP+ games and projects like DOSBox-X or DOSBox-Pure for retrogaming, but none these projects have the usability and stability needed for something work-oriented that only a hypervisor and a real Windows install can provide. I think this issue has become a duplicate of #773, the one I opened is older but has less replies and information, so feel free to close one or the other as appropriate. Edit: Off-topic but since qemu-3dfx was mentioned, SoftGPU is a free alternative if anyone wants to try it out. However I still think Wine/DOSBox-X/DOSBox-Pure are better ways to play old Windows games on Linux. |
This feature is implemented by #943 |
Hi @max8rr8 Thank you so much, I'm going to try it ASAP I have 3 questions:
Thank for your effort! |
10.0 is supported by default, it might be possible to enable 10.1 and 11 though not tested. 12 is quite different from 10/11 and i don't think it can be supported anytime soon.
Vulkan support (through venus) requires support for blob resources from kernel-side driver(that is a bit tricky) and some additional work to support windows on venus from mesa. So no it is not supported now, but can be in future. |
Does this mean we can play 3d games on Windows guest without any GPU passthrough? |
You can try, but the performance isn't going to be great, you probably will get much better result by using proton or gpu passthrough. My main motivation for working on this project is 3d acceleration of desktop apps like word, excel, browser, visual studio, etc... to lower cpu usage and improve UX compared to software rendering. |
I haven't had free time to test or look at the link carefully yet, but thanks in advance! Just a question: what version of Windows this driver should work? Also, are there any other version requirements (e.g. host kernel, QEMU version, etc.)? |
I have implemented opengl 3d acceleration on windows using my own hypervisor, mvisor. |
has it been completed? |
when such a driver is comming out, this will be a gamechanger!! |
Hi
From what I get a virtio-gpu windows guest driver already exist but there is no support for 3D acceleration with VirGL (on host) as renderer
On Linux a 3D acceleration on a virtio-gpu-gl is supported through Mesa Drivers
For windows there is support for Mesa Driver, I would like to investigate the possibility of using this drivers to interact with the virtio-gpu of this repo so to enable 3D acceleration on windows
The basic idea is:
(I know about VFIO, GPUPassthrough, Nvidia Grid ecc, but this would be a more Flexible, Hardware Agnostic and Open Source option)
Is this achievable? Or am I missing something?
Thanks,
Luca
The text was updated successfully, but these errors were encountered: