Skip to content

WIP: nir: new lower divergent barriers pass

Up to platforms like DG2, having workgroup barriers in divergent code paths didn't really matter. But on DG2, the HW state machine will just hang if a barrier is not reached by all lanes.

This pass works around this problem by splitting the shader into a sequence on continuations executed within a loop in the main function of the shader. The loop exits when all lanes have reach the end continuation.

It reuses the excellent work done by @jekstrand in lower_shader_calls().

Edited by Lionel Landwerlin

Merge request reports