Originally posted by duby229
View Post
I don't think you know exactly what Gallium3D actually is.
So, Vulkan is a direct API to the GPU. It is a basic "do this GPU," "Yes, Master" relationship. It is "low-level" in that it directly maps to the hardware, with very thin abstraction layer. So it sits directly above the driver that implements it. It is a stateless api in both practice and fact. It is at the level of "Turn left, then right, then jump."
OpenGL is a graphics API. Notice the difference. OpenGL is a model of a graphics system, that just happens to include a GPU today. It has a large number of extensions/patches that allow it to control the GPU better than when it started. It has an extension language to control the compute units that were never even thought of when it started. And it had as a design goal to be so stable that they required this language to be error checked at runtime, every time.
Vulkan is just the control structure of this low-level system. It allow the application to create state as needed. The application has to do the setup of which order to dispatch to the GPU, how to handle different queue strategies and so forth.
SPIR-V is the actual workhorse of these two, doing the actual work on the GPU, as well as interoperating with all the ISV chips. It serves the same purpose as Gallium3D's TGSI. And that is it. That's all it does. It simply exists to be a target for front ends to optimize for.
However, Vulkan requires any compliant driver to ingest SPIR-V. Now, Gallium3D's front end can target Vulkan. And is designed to do exactly that, along with whatever other backend the driver implements.
Vulkan should look familiar, because in a way, it is the bottom of the Gallium3D stack. But it deliberately leaves the top of the stack to developers to implement. So You can implement OpenGL, or DirectX 11/10/9 or Gallium3D. But, you can also implement your own stack on top, custom built for your particular use case.
It simplifies the model that Gallium3D currently uses by requiring SPIR-V be ingested by the drivers directly, as currently each driver requires a specific version of a secondary IL created for each driver. It allows GPGPU to target the same infrastructure as the graphics pipeline, providing more flexibility from the entire system.
Comment