The entry point takes a borrow of the shader module which is then cloned by the pipeline. So I gotta keep the shader, entry, and modules in a high scope
This commit is contained in:
@@ -40,6 +40,10 @@ use image::flat::NormalForm::ColumnMajorPacked;
|
||||
mod compute_kernel;
|
||||
use crate::vkprocessor::compute_kernel::ComputeKernel;
|
||||
|
||||
mod shader_kernels;
|
||||
use crate::vkprocessor::shader_kernels::ShaderKernels;
|
||||
|
||||
|
||||
#[derive(Default, Debug, Clone)]
|
||||
struct tVertex { position: [f32; 2] }
|
||||
|
||||
@@ -68,7 +72,7 @@ fn window_size_dependent_setup(
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Clone)]
|
||||
#[derive(Default, Debug, Clone)]
|
||||
struct SimpleSpecializationConstants {
|
||||
first_constant: i32,
|
||||
second_constant: u32,
|
||||
@@ -176,7 +180,6 @@ impl<'a> VkProcessor<'a> {
|
||||
|
||||
|
||||
pub fn compile_kernel(&mut self, filename: String) {
|
||||
|
||||
self.compute_kernel = Some(ComputeKernel::new(filename, self.device.clone()));
|
||||
self.compute_pipeline = Some(self.compute_kernel.clone().unwrap().get_pipeline());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user