Source/EEVEE & Viewport/GPU Module
The GPU module is located in
/source/blender/gpu and is an abstraction layer between blender and the GPU. The module started out when moving from a fixed OpenGL pipeline (glCalls) to a Core Profile OpenGL pipeline (Shaders). Currently work is in progress (Blender 2.91) to add multiple graphics libraries (OpenGL/Vulkan) to the GPU module. For Blender 2.91 this will be limited to adding an abstraction layer and hook that up to OpenGL.
The GPU module an interface to a GPU Backend. A GPU backend targets a graphics library (like OpenGL). The GPU interface must be as neutral as possible towards the backend. The idea is that when during the start of Blender to right GPU Backend is selected and used during the whole session. Switching an GPU backend requires a restart.
A challenge with OpenGL is platform support.
- First generation OpenGL 3.1 platforms have bugs on the silicon; we need to find work-a-rounds for them.
- Drivers for old generations aren't updated by the GPU company and bugs aren't fixed.
- New drivers solves issues of previous versions, but can also introduce new issues that needs to be handled.
- Since the introduction of Vulkan the OpenGL specification hasn't have any mayor release.
GPU_capabilities is used to detect specific driver capabilities and issues, so we can implement work-a-rounds.