summaryrefslogtreecommitdiffstats
path: root/third_party/rust/wgpu-hal/examples
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:29 +0000
commit59203c63bb777a3bacec32fb8830fba33540e809 (patch)
tree58298e711c0ff0575818c30485b44a2f21bf28a0 /third_party/rust/wgpu-hal/examples
parentAdding upstream version 126.0.1. (diff)
downloadfirefox-59203c63bb777a3bacec32fb8830fba33540e809.tar.xz
firefox-59203c63bb777a3bacec32fb8830fba33540e809.zip
Adding upstream version 127.0.upstream/127.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/rust/wgpu-hal/examples')
-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,
},
})
}