removed the extra stuff from the kernels. Having some issues with the layouts not agreeing with the set size...

This commit is contained in:
2019-08-11 17:23:58 -07:00
parent dfd4cbb6a2
commit 0be20eb959
11 changed files with 21 additions and 92 deletions

View File

@@ -12,6 +12,7 @@ use crate::util::compute_image::ComputeImage;
use crate::canvas::Canvas;
pub struct VkProcessor<'a> {
// Vulkan state fields
pub instance: Arc<Instance>,
pub physical: PhysicalDevice<'a>,
@@ -20,7 +21,6 @@ pub struct VkProcessor<'a> {
pub queue: Arc<Queue>,
pub dynamic_state: DynamicState,
// TODO: This will need to handle multiple of each type
pub compute_kernel: Option<ComputeKernel>,
pub compute_image: Option<ComputeImage>,
@@ -138,10 +138,7 @@ impl<'a> VkProcessor<'a> {
self.compute_image = Some(ComputeImage::new(self.device.clone(), image_filename.clone()));
}
pub fn load_textures(&mut self, image_filename: String)
{
self.load_compute_image(image_filename.clone());
pub fn load_textures(&mut self, image_filename: String) {
self.canvas.load_texture_from_filename(image_filename.clone());
}
@@ -149,7 +146,6 @@ impl<'a> VkProcessor<'a> {
self.compute_image.clone().unwrap().clone().save_image();
}
pub fn run(&mut self,
surface: &'a Arc<Surface<Window>>,
mut frame_future: Box<dyn GpuFuture>,
@@ -180,7 +176,6 @@ impl<'a> VkProcessor<'a> {
Err(err) => panic!("{:?}", err)
};
let xy = self.compute_image.clone().unwrap().get_size();
let mut command_buffer =