google / uVkCompute

A micro Vulkan compute pipeline and a collection of benchmarking compute shaders
Apache License 2.0
224 stars 38 forks source link

Fix subgroup_arithmetic benchmark for flexible subgroup sizes #46

Closed dneto0 closed 11 months ago

dneto0 commented 11 months ago

Set up source data values according to the subgroupSize device property. But inside the shader, measure the actual subgroup size, and pass it out of the shader. Then, adjust the verification logic to take that actual subgroup size into account.

This still does the same amount of arithmetic as in the original code, and it does it in the same shape.

Fixes: #45