GLSL: Passing variable length buffer array to function

1.7k Views Asked by At

I am interested in passing a variable length array (attached SSBO) to a function, i.e.:

layout(std430) buffer ssbo {
    type buffer[];
};

void func(buffer) {
    buffer[...]
}

func(buffer);

EDIT: The extension spec clearly states that this is unsupported (issue #2 - https://www.opengl.org/registry/specs/ARB/shader_storage_buffer_object.txt). Therefore work-arounds are welcome.

0

There are 0 best solutions below