@kvark So I’ve worked on a shader module for a while, and soon done with the macros (God I hate working with AST libraries)
Now I’m trying to figure out the best way of dealing with both mutating buffers and submission.
You suggested a while ago, to limit the amount of submits.
Out of curiosity is there a distinction in terms of performance/best practices between submitting on one finished CommandBuffer, vs submitting a list of CommandBuffers?
One submit, but multiple command buffers.
CommandBuffer is wrong, but I’m not sure what to call them.
My plan ahead is collect copy_buffer_to_buffer() calls in an CommandEncoder
Until rendering time is upon us and then submit everything that has changed in one go.
So there would be a global encoder created at start of a game loop.update() is called where user mutates sprites and shader values. Internally it just calls copy_buffer_to_buffer()
But it won’t be submitted until before render() is called.
Technically one should be able to do those concurrently as CommandEncoder is Sync + Send?
Encoders or CommandBuffers?ShaderModule would have its own encoder, and finalize into a command buffer and submit everything in one go.