Skip to content

intel/brw: Reorganize lowering of LocalID/Index to handle Mesh/Task

Reorganize the code to make clearer all the lowering cases:

(a) Single invocation workgroup.  Index and IDs are all zero.
(b) Local ID provided by hardware.
(c) Local Index provided by the hardware.  Depending on the case this
    might not be the final local index, e.g. heuristics for tile.
(d) Neither provided by the hardware.

Case (c) is new and supported by Mesh/Task shaders. At the moment the nir_lower_compute_system_values handle lowering of LocalID for Task/Mesh, but a later patch will flip that on ANV.

This will make the Task/Mesh use the same lowering as Compute shaders.

Also includes an extra commit for ANV to make sure the new codepath is used.

Edited by Caio Oliveira

Merge request reports