Rework submission flow to reduce waiting and improve the resource cleanup process.
This patch also gets rid of descriptor set caching.
Co-authored-by: cosmonaut <evan@moonside.games>
Co-committed-by: cosmonaut <evan@moonside.games>
This allows us to avoid monotonous boilerplate when bringing up new backends.
Co-authored-by: TheSpydog <thespydog@noreply.example.org>
Co-committed-by: TheSpydog <thespydog@noreply.example.org>
Buffer uploads now require a command buffer, like textures do. Additionally it is now regarded as an error to upload data in the middle of a render pass.
Reviewed-on: MoonsideGames/Refresh#6
Co-authored-by: cosmonaut <evan@moonside.games>
Co-committed-by: cosmonaut <evan@moonside.games>
We used to have monolithic uniform buffers on the VulkanRenderer object, but this was inefficient in the case of threaded usage.
Now, we have a pool of uniform buffers. A uniform buffer is selected from the pool when a pipeline is bound. The uniform buffers are rotated upon presentation.
Now pushing uniforms is now a concern of the command buffer instead of the pipeline. The pipeline should just always have been a static object anyway.
Additionally, we now do extra buffer record-keeping so that buffer data can be updated after a bind/draw.
Fence submission has also been restructured so that submissions don't cause unnecessary blocks. Now we assign one fence per submission, and we don't wait for fences until it's time to present.
Reviewed-on: MoonsideGames/Refresh#1
Co-authored-by: cosmonaut <evan@moonside.games>
Co-committed-by: cosmonaut <evan@moonside.games>