larso0 / vmgpu

Vulkan Multi-GPU application
MIT License
15 stars 4 forks source link

Request: setup/compilation walkthrough #1

Closed cxw42 closed 5 years ago

cxw42 commented 5 years ago

Lars, I found this project through your NIK 2018 paper while looking for information about GPU affinity in Vulkan. It looks very interesting! You have clearly put in a lot of work on this project.

Context: I am hoping to adapt Bonzomatic to use Vulkan (instead of GLFW+OpenGL) to render a fragment shader in a full-screen quad, locked to one of two GPUs in the test system (for a Shader Showdown at the Demosplash demoparty). I think bp+vmgpu can get me most of the way there.

Request: Would you be willing to expand the README to include a walkthrough of how you set up your system and compiled bp and vmgpu? For example, does the find_package(Vulkan) in the CMake file refer to the LunarG SDK or some other Vulkan package? What OS and compiler did you use? Do bp and vmgpu require C++11 or another specific C++ language version? What extra libraries did you need to install (I see the dependency on shaderc). What graphics cards did you use, and with which drivers?

Thank you for considering this request!

larso0 commented 5 years ago

Do you use windows or linux? I used to compile this either on linux or with mingw-w64 with MSYS2. MSYS2 have a package manager (pacman) and packages for boost, qt, etc, so it is easy to set up.

I have spent a few hours now trying to build with visual studio. Gotten to the point where I successfully built bp. I added glm and shaderc as submodules of bp so it is easier to compile it (see https://github.com/larso0/bp). I have issues with boost and visual studio so haven't been able to compile vmgpu yet. I'll probably sit down and update the README of both bp and vmgpu the coming weekend. But I'll probably leave compiling boost with visual studio as an exercise to the user.

My master thesis (pdf) describes bp and vmgpu in more detail (with code examples) than the NIK paper, if you're interrested.

cxw42 commented 5 years ago

@larso0 Thank you! I am currently on Windows 7 x64 and have both Cygwin and mingw-w64/msys2 available. I am currently compiling Bonzomatic on mingw-w64's mingw32 (i686, non-MSYS), so I am glad to hear that you have also used mingw-w64. At Demosplash, we will be using a Windows 10 x64 box. I am perfectly comfortable not touching Visual Studio :D , so no worries there.

Thanks for the work; I look forward to the README updates! I will check out the thesis and examples. I also spent some quality time with OGLDEV's Vulkan tutorials 50--52 yesterday and it is ... quite an API!

larso0 commented 5 years ago

I have updated the readme now. Though I have an issue causing black screen. I probably broke something when I added shaderc etc as submodules. But it is probably not shaderc that is the problem, as the shaders are compiled with glslangvalidator and loaded from file. Maybe just some difference in the math library versions (glm) causing the geometry to become not visible. I don't have the motivation to sit down and fix this for now.

larso0 commented 5 years ago

Okay I got some motivation after a good night sleep. The GLM version was the problem. I changed the glm submodule of bp to point to GLM version 0.9.8 specifically which works as intended. For future reference, the version of boost: 1.66 and qt: 5.10.1.

cxw42 commented 5 years ago

Lars, thank you! I will give it a try.