[libre-riscv-dev] presentation on graphics drivers & doing it right the first time

Michael Pham pham.michael.98 at gmail.com
Fri Oct 4 06:37:00 BST 2019


On Fri, Oct 4, 2019 at 1:08 AM Jacob Lifshay <programmerjake at gmail.com> wrote:
>
> Vulkan is basically the driver model (API), it's actually quite similar to
> Gallium.
>
> Kazan is an implementation of both:
> 1. the translation layer from Vulkan to the internal memory structures and
> shader invocations
> 2. the front end of the shader compiler
>
For your second point, how does SPIR-V/NIR factor into the front end?

> the backend compiler is part of LLVM, Cranelift, and/or GCC (the three
> compilers I am planning on Kazan being able to use).
>
It's interesting how you are planning on Cranelift being one of the backends.
Very interesting project, but compilers are a lot of hard work.

> OpenGL is at a higher level of abstraction and very complex to implement
> due to about 20 years of backwards compatibility and feature agglomeration,
> so Mesa translates it to Gallium, which is what the drivers implement.
>
And this is where Zink comes into the picture

> The Vulkan drivers in Mesa don't use Gallium (for at least RADV and ANV,
> don't know for the others) since Vulkan is at about the same level of
> abstraction, they instead translate directly to the different drivers'
> internal calls.
>

I get what you're saying but if I remember correctly from previous
discussion on mailing list, you will have to use a modified backend
compiler for Libre RISC-V right?

I found this complicated chart on an irc channel:
https://www.flherne.uk/files/mesa_irs_2.png
(honestly, the linux graphics stack evolves super fast every year,
it's hard for me to keep up with all the developments)

So from your description, Kazan is about the same place as radv on
that chart? And the backend is a separate thing from Kazan if I
understand you.

Michael



More information about the libre-riscv-dev mailing list