Skip to content

Commit

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

See gfx-rs/wgpu#5508

---------

Co-authored-by: Lixou <82600264+DasLixou@users.noreply.github.com>
  • Loading branch information
waywardmonkeys and DasLixou authored May 13, 2024
1 parent d917b8b commit 1daf2a4
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,
..Default::default()
},
});
WgpuShader {
pipeline,
Expand Down

0 comments on commit 1daf2a4

Please sign in to comment.