mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-19 22:11:01 +01:00
`BackendBit::all()` allows GL/surfman to be used on macOS which appears to prevent rendering with Metal (e.g. hello-triangle displays an empty window). surfman will be removed in later versions of gfx, which will allow us to switch back to `BackendBit::all()` in the examples.
hello-compute
Runs a compute shader to determine the number of iterations of the rules from Collatz Conjecture
- If n is even, n = n/2
- If n is odd, n = 3n+1
that it will take to finish and reach the number 1.
To Run
# Pass in any 4 numbers as arguments
RUST_LOG=hello_compute cargo run --example hello-compute 1 4 3 295
Example Output
[2020-04-25T11:15:33Z INFO hello_compute] Times: [0, 2, 7, 55]