I had some requirements for writing a vulkan software rasterizer within the Mesa project. I took some time to look at the options and realised that just writing a vulkan layer on top of gallium's llvmpipe would be a good answer for this problem. However in doing so I knew people would ask why this wouldn't work for a hardware driver.tl;dr DO NOT USE VALLIUM OVER A GALLIUM HW DRIVER,

What is vallium?The vallium layer is a gallium frontend. It takes the Vulkan API and roughly translates it into the gallium API. How does it do that?Vulkan is a lowlevel API, it allows the user to allocate memory, create resources, record command buffers amongst other things. When a hw vulkan driver is recording a command buffer, it is putting hw specific commands into it that will be run directly on the GPU. These command buffers are submitted to queues when the app wants to execute them.



Gallium is a context level API, i.e. like OpenGL/D3D10. The user has to create resources and contexts and the dr…