Fix: Vulkan Use Resource After Free

When immediate mode is used with a temp texture the
draw command was executed after the texture was freed.

This PR ensures that the draw command is executed before
the texture is freed.

Pull Request: https://projects.blender.org/blender/blender/pulls/111111
This commit is contained in:
Jeroen Bakker 2023-08-15 14:15:46 +02:00
parent dd4ab50065
commit ab3ae2be4d

@ -57,6 +57,8 @@ void VKImmediate::end()
vertex_attributes_.bind(context);
context.command_buffer_get().draw(0, vertex_len, 0, 1);
context.command_buffer_get().submit();
buffer_offset_ += current_subbuffer_len_;
current_subbuffer_len_ = 0;
}