Speed up zero initialization of workgroup memory #4592
Open
Description
This is related to #4591; when forcing spv::ZeroInitializeWorkgroupMemoryMode::Polyfill
in device_from_raw()
, we observe very slow (but correct!) behavior for zeroing the workgroup shared array - all the work is done on one thread. It would be better to distribute this; in this case the array size and workgroup size match, so for each invocation to zero one array element would be simple and efficient.
Repro case is the same as the linked bug, but changing line 1307 of vulkan/adapter.rs
to Polyfill
.