|
|
|
@ -90,12 +90,12 @@ impl CompuState {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
pub fn compute_commands(&mut self,
|
|
|
|
|
compute_frame: CompuFrame,
|
|
|
|
|
compute_frame: &CompuFrame,
|
|
|
|
|
mut command_buffer: &mut AutoCommandBufferBuilder,
|
|
|
|
|
canvas: &CanvasState) {
|
|
|
|
|
|
|
|
|
|
// i = (Buffer, Kernel)
|
|
|
|
|
for i in compute_frame.pure_compute {
|
|
|
|
|
for i in &compute_frame.pure_compute {
|
|
|
|
|
let buffer_id = (*i.0).clone().get_handle() as usize;
|
|
|
|
|
let kernel_id = (*i.1).clone().get_handle() as usize;
|
|
|
|
|
|
|
|
|
@ -112,7 +112,7 @@ impl CompuState {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// i = (Buffer, Image, Kernel)
|
|
|
|
|
for i in compute_frame.swapped_to_image {
|
|
|
|
|
for i in &compute_frame.swapped_to_image {
|
|
|
|
|
let buffer_id = (*i.0).clone().get_handle() as usize;
|
|
|
|
|
let image_id = i.1.clone();
|
|
|
|
|
let kernel_id = (*i.2).clone().handle as usize;
|
|
|
|
@ -140,7 +140,7 @@ impl CompuState {
|
|
|
|
|
|
|
|
|
|
// i = (Input Buffer, Output Buffer, Kernel)
|
|
|
|
|
// Input buffer -> Kernel -> Output buffer
|
|
|
|
|
for i in compute_frame.swapped_to_buffer {
|
|
|
|
|
for i in &compute_frame.swapped_to_buffer {
|
|
|
|
|
let input_buffer_id = (*i.0).clone().get_handle() as usize;
|
|
|
|
|
let output_buffer_id = (*i.1).clone().get_handle() as usize;
|
|
|
|
|
let kernel_id = (*i.2).clone().handle as usize;
|
|
|
|
|