Skip to content

intel/compiler: Rework SIMD selection for compute shaders

Caio Oliveira requested to merge cmarcelo/mesa:r/intel-simd-selector into main

Rework the logic to decide which SIMD to use for compute shaders, and move it where it can be reused for Task/Mesh later. Also add unit tests for it, so we keep track future changes to the helper won't break some expected choices. I've included a few interesting tests, but the more important contribution here is to reduce the friction for adding new tests later.

The last patch is an improvement for CS to not care about larger SIMDs when the full workgroup already fits in a SIMD, e.g. a workgroup with size 1 should only compile SIMD8 shader. We can do even better in those scenarios (and justify a SIMD16) but that's not done yet, see #3083.

Merge request reports