Giter Site home page Giter Site logo

gmh5225 / virtio-gpu-win-icd Goto Github PK

View Code? Open in Web Editor NEW

This project forked from keenuts/virtio-gpu-win-icd

0.0 0.0 0.0 208 KB

OpenGL ICD for Virtio-GPU Windows driver

License: BSD 2-Clause "Simplified" License

C++ 64.39% Python 10.23% C 24.84% Batchfile 0.54%

virtio-gpu-win-icd's Introduction

This is an old repository, made as a PoC back in 2017. This "worked" at the time as is it built, and was able to execute some form of 3D acceleration using Virtio-GPU (not integrated with the window manager).

I haven't worked on VirtIO-GPU since 2018, and thus have no idea what the latest progress are. But it seems the most recent/promising work is virtio-win/kvm-guest-drivers-windows#943 So I'd encourage you to go see this work instead of this outdated repository. ๐Ÿ˜Š

Windows ICD for Qemu/KVM

Proof of concept repo for an OpenGL ICD.

This project is NOT supposed to compile. It was compiling a long time ago, but I do not know how broken it is now. This project ONLY works in 1 specific setup, on QEMU/KVM, with the proper custom forked version of the VirtioGPU kernel driver.

The compile.bat file is just a wrapper to devenv. Usage is something like

./compile.bat  ICD/DEMO  Debug/Release Win32/other-target-archi

and maybe a 4th parameter like x86/x64, not sure anymore

Looking at that link might help: https://docs.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=vs-2015

Where to start if you want to work on this project?

Even if everything compiles, and you use the provided patched kernel driver, things might not work anymore. The graphic driver on windows was written without any support/documentation from Microsoft. When writing this code, I had to fumble around to understand how windows behaved. And because of time constraints, I decided to bypass everything using the escape function: https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/d3dkmddi/nc-d3dkmddi-dxgkddi_escape

  • You need a linux host with QEMU and a windows guest.
  • You need to use a virtio-gpu device (not QXL).
  • You need to build/install a special windows guest kernel driver: https://github.com/Keenuts/virtio-gpu-win
  • You need to build this ICD and the example OpenGL app.
  • Using a normal userland debugger on Windows, make sure this custom Opengl32.dll is used when you start the demo app.
  • Once you know the custom ICD is used, use windbg to check that the custom kernel driver is being used (The fact that Windows is unstable is a good indicator that this custom driver is in use).
  • Use a debugger/print statements on the host (require building you own qemu/virglrenderer with debug flags or print statements), and check the host receives the virtio-gpu commands.

Once you observe the virtio-gpu implementation on the host receiving commands from the OpenGL sample app, you are good to go! Next step is to implement a proper ICD (reuse MESA), and integrate with D3DKMD properly.

Additional informations can be found here: https://www.studiopixl.com/2017-08-27/3d-acceleration-using-virtio.html

virtio-gpu-win-icd's People

Contributors

keenuts avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.