Hi, I would like to pass a struct contained in a shader storage buffer to a function and perform some atomic additions on a uint member of the struct. However the shader won’t compile because:
A shader will fail to compile if the value passed to the mem argument of an atomic memory function does not correspond to a buffer or shared variable
I was wondering if there’s some variable qualifier to enforce a function parameter to be backed by a buffer. As far as I know in, out, inout and const in are the only available parameter qualifiers, but maybe I’m missing something here.
Actually, thinking about how GLSL functions copy arguments in and out, I’m guessing it’s not possible, is it?