Skip to content

Commit

Permalink
Disable zeroing workgroup memory for compute shaders.
Browse files Browse the repository at this point in the history
This is a performance improvement for shader compilation.

See gfx-rs/wgpu#5508
  • Loading branch information
waywardmonkeys committed May 13, 2024
1 parent d917b8b commit ed8af50
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/wgpu_engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,10 @@ impl WgpuEngine {
layout: Some(&compute_pipeline_layout),
module: &shader_module,
entry_point: "main",
compilation_options: PipelineCompilationOptions::default(),
compilation_options: PipelineCompilationOptions {
zero_initialize_workgroup_memory: false,
..PipelineCompilationOptions::default()
},
});
WgpuShader {
pipeline,
Expand Down

0 comments on commit ed8af50

Please sign in to comment.