summaryrefslogtreecommitdiffstats
path: root/third_party/rust/wgpu-hal/examples
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--third_party/rust/wgpu-hal/examples/halmark/main.rs6
-rw-r--r--third_party/rust/wgpu-hal/examples/ray-traced-triangle/main.rs2
2 files changed, 8 insertions, 0 deletions
diff --git a/third_party/rust/wgpu-hal/examples/halmark/main.rs b/third_party/rust/wgpu-hal/examples/halmark/main.rs
index c238f299e7..aef6919c8f 100644
--- a/third_party/rust/wgpu-hal/examples/halmark/main.rs
+++ b/third_party/rust/wgpu-hal/examples/halmark/main.rs
@@ -245,17 +245,22 @@ impl<A: hal::Api> Example<A> {
.unwrap()
};
+ let constants = naga::back::PipelineConstants::default();
let pipeline_desc = hal::RenderPipelineDescriptor {
label: None,
layout: &pipeline_layout,
vertex_stage: hal::ProgrammableStage {
module: &shader,
entry_point: "vs_main",
+ constants: &constants,
+ zero_initialize_workgroup_memory: true,
},
vertex_buffers: &[],
fragment_stage: Some(hal::ProgrammableStage {
module: &shader,
entry_point: "fs_main",
+ constants: &constants,
+ zero_initialize_workgroup_memory: true,
}),
primitive: wgt::PrimitiveState {
topology: wgt::PrimitiveTopology::TriangleStrip,
@@ -840,6 +845,7 @@ fn main() {
}
}
ex.render();
+ window.request_redraw();
}
_ => {
example.as_mut().unwrap().update(event);
diff --git a/third_party/rust/wgpu-hal/examples/ray-traced-triangle/main.rs b/third_party/rust/wgpu-hal/examples/ray-traced-triangle/main.rs
index c05feae820..3985cd60af 100644
--- a/third_party/rust/wgpu-hal/examples/ray-traced-triangle/main.rs
+++ b/third_party/rust/wgpu-hal/examples/ray-traced-triangle/main.rs
@@ -371,6 +371,8 @@ impl<A: hal::Api> Example<A> {
stage: hal::ProgrammableStage {
module: &shader_module,
entry_point: "main",
+ constants: &Default::default(),
+ zero_initialize_workgroup_memory: true,
},
})
}