Nice post! Is there a way to directly use uniform variables in e.g. OpenCL, or is it up to the kernel compiler to determine that some variable is wavefront- or group-invariant?
https://www.khronos.org/registry/OpenCL/sdk/2.1/docs/man/xht...
In general it is up to the compiler to decide what variables are uniform as it is pretty easy for user to get it wrong. Metal shader language as a uniform marker: uniform<int> i = …;
Metal spec: https://developer.apple.com/metal/Metal-Shading-Language-Spe...