[Nvidia Optimus] Why does GPU offloading require supported drivers?
I just read about Nvidia 435 now supporting GPU offloading of OpenGL and Vulkan apps with dual intel & Nvidia gpus. I assumed so far that offloading is the Vulkan ICD loader and the LibGLVN's job, since they decide which implementation to load for an application, and thus which driver is used to render. But then I read here about a ton of Xorg configuration in order to get it working, and now I really don't think I understand how GPU offloading works
So it's more than just loading a different libgl implementation, I suppose. Does anyone have a clear understanding on how an app renders on the screen using GPU and LibGl / LibVk? Thanks!
About this post
- Posted
- Archived
- Score
- 11 · 100% up
- Kind
- Text
- ID
- dwdalm
7 comments
You can render on the Nvidia card just fine with just a Vulkan loader - the tricky part is getting the frames on screen, which is only connected to the integrated card. The trickier part is doing it quickly, i.e. without copying the rendered image through RAM. The even trickier part is making the whole thing work with color management, vsync, adaptive refresh and all the other display-related stuff.
Wait aren't both the iGPU and the Nvidia one connected to a framebuffer, which is fed to the screen?
There is no separate "framebuffer" hardware, a framebuffer is just a chunk of VRAM. Each GPU technically has a display controller, so it could drive a screen, but only one GPU can drive a specific screen at a time, and most laptops don't actually connect the external card to the screen at all. Also, what if the game is running in windowed mode?