It's not sure if this extension is supported everywhere
This commit uses normal descriptor pools, sets and writes,
which are all availabel in base vulkan.
Until now we only considered the builtin uniform variables.
This commit attempts to make the code in the vulkan Shader
implementation more general, as to allow for custom uniforms.
This is not possible yet, but should be easier to implement now.
Until now we've used a command buffer for every swap chain image,
however it makes more sense to just have a command buffer for every
frame in flight, since we won't be ever recording more than that.
This makes it more in line with the data transfer command buffers,
which are also just created per frame in flight.
This should make more sense.
There is no real effect yet when rendering, however debugging the
application with renderdoc reveals that the mipmap generation is
already correct. There's probably something weird going on with the
sampling. I'll have to look into that next.
Until now we did a linear search in a vector to find the cashed
pipeline given a certain configuration. This is of course not a very
efficient way. This commit now uses a hashmap which should still be
fast even when there are a lot of pipelines already created.
Before this commit we would greedily wait for the upload to be complete
before exiting the function. This is of course not correct, since
we might be changing data that is still being used in a render in
flight. Of course we also need to cleanup the resources asynchronously
after the frame has been rendered fully.
There was a bug where the count of used builtin uniform buffer objects
was not advanced. This caused another problem since vulkan requires
a certain alignment for the buffer. This commit fixes both of those
things.
using the vulkan functionality probably leads to less bugs.
Until now it was assumed that any image was in the rgba8 format,
which is of course not correct. Clearing a texture to white or black
should now work for any format.
Sometimes canvas commands wouldn't get executed.
This was because when the window gets resized,
the command buffers would get recreated, and would thus
lose the recorded commands.