3 ms·
Yes. In fact, that's essentially what the drivers are.
by TheFlash 6y ago
Yes. In fact, that's essentially what the drivers are.
- psykotic 6y agoLeaving aside arguments about "what the drivers are", the kernel driver being discussed here generally doesn't have or need that kind of thing. The user-space drivers which talk to the kernel drivers are under the Mesa umbrella as part of Gallium for OpenGL and Direct3D support (e.g. https://github.com/mesa3d/mesa/tree/master/src/gallium/drivers/radeonsi https://github.com/mesa3d/mesa/tree/master/src/gallium/drive...) or as a standalone driver for Vulkan support (https://github.com/mesa3d/mesa/tree/master/src/amd/vulkan https://github.com/mesa3d/mesa/tree/master/src/amd/vulkan). That said, I haven't seen many app-specific hacks in the open source drivers, even in the user-space code. If anyone wants to learn more about lower-level aspects of GPUs, the Vulkan driver code I linked is one of the best places to start. It directly implements the Vulkan API on one end and talks to the kernel drivers on the other end, so it's relatively easy to follow if you're a systems programmer with an API-level understanding of graphics. Just pick a Vulkan function of your choice and start tracing through the code, e.g. vkCmdDraw: https://github.com/mesa3d/mesa/blob/master/src/amd/vulkan/radv_cmd_buffer.c#L5365 https://github.com/mesa3d/mesa/blob/master/src/amd/vulkan/ra.... The Vulkan driver calls into some of the low-level radeonsi code I linked from the Gallium tree but it isn't a Gallium-based driver, so you don't have to deal with those extra layers of abstraction.
- account42 6y ago> That said, I haven't seen many app-specific hacks in the open source drivers, even in the user-space code. They are enabled via driconf [0]. Not nearly as many as what I imagine you'd find in the proprietary Windows drivers though. [0] https://github.com/mesa3d/mesa/blob/master/src/util/00-mesa-defaults.conf https://github.com/mesa3d/mesa/blob/master/src/util/00-mesa-...
- Audiophilip 6y agoAlso: https://github.com/mesa3d/mesa/blob/master/src/amd/vulkan/radv_device.c#L561 https://github.com/mesa3d/mesa/blob/master/src/amd/vulkan/ra...