Skip to content

Commit

Permalink
Handle wgsl errors in the game of life example
Browse files Browse the repository at this point in the history
  • Loading branch information
kornelski committed Jun 1, 2024
1 parent 4b996c7 commit 0797e81
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions examples/shader/compute_shader_game_of_life.rs
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,12 @@ impl render_graph::Node for GameOfLifeNode {
// if the corresponding pipeline has loaded, transition to the next stage
match self.state {
GameOfLifeState::Loading => {
if let CachedPipelineState::Ok(_) =
pipeline_cache.get_compute_pipeline_state(pipeline.init_pipeline)
{
self.state = GameOfLifeState::Init;
match pipeline_cache.get_compute_pipeline_state(pipeline.init_pipeline) {
CachedPipelineState::Ok(_) => {
self.state = GameOfLifeState::Init;
}
CachedPipelineState::Err(err) => panic!("{err}"),
_ => {}
}
}
GameOfLifeState::Init => {
Expand Down

0 comments on commit 0797e81

Please sign in to comment.