Now we are free
3D: Low Level
Low Level API's that aim fit the current GPU systems better then the old graphic API's such as OpenGL/DirectX. This is done by getting rid of most of the state management and handing that responsibility over to the application instead.
Many objects are created in full before they are used. It makes it possible to verify everything at creation time. Create functions take a structure with everything there is to know about the new object. In DirectX12 the structures are namned *_DESC and in Vulkan *CreateInfo.
The API is used by the CPU to write commands to memory. The memory area is called a command buffer. Only the driver know the exact format of the commands as they depend on the GPU. Once we are done building the command buffer we submitt or queue it for execution. The CPU can then start building a new command buffer and the GPU will begin reading and processing commands from the completed buffer when it reach it in the queue. Command buffers can be recorded at the same time on more then one thread. The GPU always consume in the order submitted to a queue but there can be more then one queue available.
Free-threaded record/submit. There is no global context but you need to make sure to not access a object at the same time as another thread.
No state inheritance across buffers.
D3D12: ID3D12CommandList and ID3D12CommandQuueue
Metal: MTLCommandBuffer and MTLCommandQueue
Vulkan: VkCmdBuffer and VkCmdQueue
Pipeline State Objects
A PSO is a single object that encapsulates almost the entire GPU state. Instead of micromanaging state changes one switch the whole state directly. The PSO contain the shaders for all the stages so one PSO is needed for every combination of shaders. Resource bindings such as vertex/index/constants buffers and textures are not part of the PSO.
GPU Memory Aliasing - 2020
Device Memory Management - 2018
Breaking Down Barriers - GDC 2019
Choosing a binding model - 2017