We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d5d0c90 commit 93d2194Copy full SHA for 93d2194
examples/shaders/compute-shader/src/lib.rs
@@ -44,13 +44,5 @@ pub fn main_cs(
44
#[spirv(storage_buffer, descriptor_set = 0, binding = 0)] prime_indices: &mut [u32],
45
) {
46
let index = id.x as usize;
47
- prime_indices[index] = unwrap_or_max(collatz(prime_indices[index]));
48
-}
49
-
50
-// Work around https://github.com/EmbarkStudios/rust-gpu/issues/677
51
-fn unwrap_or_max(option: Option<u32>) -> u32 {
52
- match option {
53
- Some(inner) => inner,
54
- None => u32::MAX,
55
- }
+ prime_indices[index] = collatz(prime_indices[index]).unwrap_or(u32::MAX);
56
}
0 commit comments