jamienicol / glsl-optimizer

GLSL optimizer based on Mesa's GLSL compiler. Used in Unity for mobile shader optimization.
Other
9 stars 8 forks source link

Support for storage buffers #1

Closed kvark closed 4 years ago

kvark commented 4 years ago

Copied from https://github.com/aras-p/glsl-optimizer/issues/150

We are exploring the use of storage buffers in WebRender, and glsl optimizing stage unfortunately doesn't recognize them. Example syntax we use:

layout(std140, binding = 0) buffer bInstances {
    ivec4 bInstanceData[];
};

This is code in GLES 3.1, and under "GL_ARB_shader_storage_buffer_object" extension in GL.

jamienicol commented 4 years ago

Fixed by 44bb1ee6994b5c1809e7b9a9b0b6ffff4cf361d3