Skip to content

Commit ca361fb

Browse files
committed
[update] push constant byte type.
1 parent 92fc525 commit ca361fb

4 files changed

Lines changed: 12 additions & 5 deletions

File tree

lambda/src/core/render/command.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ pub enum RenderCommand {
3737
pipeline: Rc<super::pipeline::RenderPipeline>,
3838
stage: super::pipeline::PipelineStage,
3939
offset: u32,
40-
bytes: &'static [u32],
40+
bytes: Vec<u32>,
4141
},
4242
/// Draws a graphical primitive.
4343
Draw { vertices: Range<u32> },

lambda/src/core/render/mod.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,15 +232,17 @@ impl RenderContext {
232232
command_buffer.issue_commands(platform_command_list);
233233
command_buffer.issue_command(PlatformRenderCommand::EndRecording);
234234

235+
println!("[INFO] {} will now submit commands to the GPU.", self.name);
235236
self.gpu.submit_command_buffer(
236237
&mut command_buffer,
237-
vec![],
238+
vec![self.render_semaphore.as_ref().unwrap()],
238239
self
239240
.submission_fence
240241
.as_mut()
241242
.expect("Failed to get mutable reference to submission fence."),
242243
);
243244

245+
println!("[INFO] {} will now render to the surface.", self.name);
244246
self
245247
.gpu
246248
.render_to_surface(
@@ -250,6 +252,10 @@ impl RenderContext {
250252
)
251253
.expect("Failed to render to the surface");
252254

255+
println!(
256+
"[INFO] {} will now wait for the GPU to finish rendering.",
257+
self.name
258+
);
253259
match self.frame_buffer {
254260
Some(_) => {
255261
Rc::try_unwrap(self.frame_buffer.take().unwrap())

lambda/src/core/render/shader.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ impl ShaderBuilder {
2020

2121
/// Compiles the virtual shader into a real shader with SPIR-V binary
2222
/// representation.
23-
pub fn build(&mut self, meta_shader: VirtualShader) -> Shader {
24-
let binary = self.compiler.compile_into_binary(&meta_shader);
23+
pub fn build(&mut self, virtual_shader: VirtualShader) -> Shader {
24+
let binary = self.compiler.compile_into_binary(&virtual_shader);
2525

2626
return Shader {
2727
binary,
28-
virtual_shader: meta_shader,
28+
virtual_shader,
2929
};
3030
}
3131
}

lambda/src/runtimes/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ impl Runtime for GenericRuntime {
254254
} => {}
255255
WinitWindowEvent::Touch(_) => {}
256256
WinitWindowEvent::ThemeChanged(_) => {}
257+
_ => {}
257258
},
258259
WinitEvent::MainEventsCleared => {
259260
let last_frame = current_frame.clone();

0 commit comments

Comments
 (0)