143 points · by mfilion · 6y ago · 22 comments
"Next year you will see us introduce two single board computers based on the RK3566"
and
"it is our choice for NON-Pro PINE64 devices to come"
I am really looking forward to these SBCs! Should be cool (although a PINE64 rep has also said "Also, realistically, I think that it will be 2-3 years before mainline is usable in a desktop application on the RK3566.").
Source: https://www.pine64.org/2020/11/15/november-update-kde-pineph...
Can someone expand on why Mesa needs to "support" specific GPUs?
I thought that supporting hardware under Linux was a kernel matter, and assumed that Mesa was an OpenGL implementation for Linux, so talking to kernel APIs in a hardware-independent way (since talking to the hardware is a kernel matter).
Where am I wrong? What does "support for GPU xyz" mean in Mesa's case? Thanks.
I'm sure this drastically oversimplifies the situation, so please correct / fill in what I'm missing, but I believe this will answer the OP's question.
Specifically with regard to compiling: OpenGL 2.0 introduced the "GLSL" shader language, which is a C-like language that compiles to run on specific GPUs. OpenGL has an API call that says "given this GLSL string, compile it for the current GPU", and the libGL driver compiles that string for the program at runtime. You don't compile it ahead-of-time.
But also, the 3D APIs exposed by the kernel are pretty low-level, mostly just slightly abstracting over what the hardware itself exposes, essentially exposing a different API for each family of GPUs. The work of abstracting over those different low-level APIs in to a vendor-neutral API (in this case, the OpenGL API), is the job of a userspace library (in this case, libGL).
(Now, 2D acceleration, the kernel does a lot more work to provide a consistent 2D API between different devices.)
On Windows (at least back in the days when I was kinda familiar with Windows), that's pretty much how it really worked: when you installed the drivers for your GPU, a large part of that was just it plopping in its own libGL. A growing part of libGL is actually hardware-neutral OpenGL-related code, and most hardware vendors hold their libGL close to their chest because they're competing on optimizing the hardware-neutral OpenGL code in their libGLs almost as much as they're competing on actual hardware. But in the FOSS world, where the code isn't a secret, all that hardware-neutral OpenGL code can actually be shared between the libGLs for different GPUs, so we've ended up with pretty much just one libGL that supports all the GPUs: Mesa. So Mesa is both the graphics card driver and the hardware-neutral part of OpenGL.
Now, as much as I would like it to be, GNU/Linux isn't just the "FOSS world", we still have proprietary things here: For many years you had to choose between Mesa or your hardware vendor's proprietary libGL, most notably NVIDIA's. Eventually NVIDIA realized that it was problematic to ask users to remove Mesa, especially with the growing occurrence of multi-GPU systems. So NVIDIA coordinated with Mesa to create libglvnd (lib GL vendor neutral dispatch), which can be the libGL, but is thin shim that will dispatch to the "real" libGL implementation (NVIDIA's or Mesa's) as appropriate, so that they can be installed side-by-side.
It's somewhat amusing to me that the people who discuss exokernels rarely talk about GPUs, even though that's the one area of computing where exokernel ideas are universally deployed today.
Lazy HN: does this support Vulkan 1.2? Descriptor indexing? Memory model? Subgroup size control?
Will it work on a Pine RockPro64? If so, what's the least-hassle way to get up-to-date drivers? If someone is interested in helping get piet-gpu running on the hardware, let me know.
Edit: I see you are specifically asking about vulkan. I don't think vulkan is supported in panfrost right now. Just OpenGL.