disable mesh shading
This commit is contained in:
+14
-2
@@ -207,6 +207,7 @@ struct RenderContext {
|
||||
previous_frame_end: Option<Box<dyn GpuFuture>>,
|
||||
gui: Gui,
|
||||
render_start: Instant,
|
||||
new_object_start: Option<Instant>,
|
||||
}
|
||||
|
||||
fn app_version() -> Version {
|
||||
@@ -305,7 +306,7 @@ impl App {
|
||||
|
||||
let mut device_extensions = DeviceExtensions {
|
||||
khr_swapchain: true,
|
||||
ext_mesh_shader: true,
|
||||
ext_mesh_shader: false,
|
||||
khr_fragment_shading_rate: true,
|
||||
..DeviceExtensions::empty()
|
||||
};
|
||||
@@ -762,6 +763,7 @@ impl ApplicationHandler for App {
|
||||
previous_frame_end,
|
||||
gui,
|
||||
render_start: Instant::now(),
|
||||
new_object_start: None,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -847,7 +849,8 @@ impl ApplicationHandler for App {
|
||||
rot: Vec3::ZERO,
|
||||
scale: Vec3::ONE,
|
||||
};
|
||||
self.rcx.as_mut().unwrap().recreate_shaders = true;
|
||||
let rcx = self.rcx.as_mut().unwrap();
|
||||
rcx.recreate_shaders = true;
|
||||
},
|
||||
_ => {},
|
||||
},
|
||||
@@ -912,6 +915,7 @@ impl App {
|
||||
}
|
||||
|
||||
if rcx.recreate_shaders {
|
||||
rcx.new_object_start = Some(Instant::now());
|
||||
let new_module = self.gstate.csg[0]
|
||||
.parts
|
||||
.compile_to_spirv(Some(self.base_module.clone()));
|
||||
@@ -953,6 +957,14 @@ impl App {
|
||||
},
|
||||
);
|
||||
rcx.recreate_pipelines = false;
|
||||
if (rcx.new_object_start.is_some()) {
|
||||
let end = Instant::now();
|
||||
info!(
|
||||
"Object recreation took {} milliseconds",
|
||||
(end - rcx.new_object_start.unwrap()).as_secs_f64() * 1000.0
|
||||
);
|
||||
rcx.new_object_start = None;
|
||||
}
|
||||
}
|
||||
|
||||
let (mut push_constants, cam_set) = {
|
||||
|
||||
Reference in New Issue
Block a user