just doing a naive layered compute for meow

This commit is contained in:
2019-08-28 22:55:44 -07:00
parent 885e19fb64
commit 66d11e22c0
3 changed files with 75 additions and 18 deletions

View File

@@ -184,11 +184,9 @@ impl<'a> VkProcessor<'a> {
-> Box<dyn GpuFuture> {
// take the canvas frame and create the vertex buffers
// TODO: This performs gpu buffer creation. Shouldn't be in hotpath
self.canvas.draw(canvas_frame);
// ditto with the compuframe
self.compute_state.compute(compute_frame);
let mut framebuffers =
self.canvas.window_size_dependent_setup(&self.swapchain_images.clone().unwrap().clone());
@@ -229,6 +227,9 @@ impl<'a> VkProcessor<'a> {
.copy_buffer_to_image(self.compute_image.clone().unwrap().clone().rw_buffers.get(0).unwrap().clone(),
self.compute_image.clone().unwrap().clone().get_swap_buffer().clone()).unwrap();
// ditto with the compuframe
let mut command_buffer = self.compute_state.compute_commands(compute_frame, command_buffer, &self.canvas);
let mut command_buffer = self.canvas.draw_commands(command_buffer, framebuffers, image_num);
let command_buffer = command_buffer.build().unwrap();