From 1daf2a4aec1afd150712087764156a4ba9df8fd4 Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Mon, 13 May 2024 21:59:13 +0700 Subject: [PATCH] Disable zeroing workgroup memory for compute shaders. (#575) This is a performance improvement for shader compilation. See https://github.com/gfx-rs/wgpu/pull/5508 --------- Co-authored-by: Lixou <82600264+DasLixou@users.noreply.github.com> --- src/wgpu_engine.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/wgpu_engine.rs b/src/wgpu_engine.rs index e102e9a55..f743d12c3 100644 --- a/src/wgpu_engine.rs +++ b/src/wgpu_engine.rs @@ -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,