Hacker News new | ask | show | jobs
by tomtomlapomme 2896 days ago
__local is meant to describe memory shared across the whole workgroup meaning each operation is visible to all SIMD lanes. Uniform are variables that have are only visible to one lane but can be proven to have the same value for all SIMD lanes.

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...