GLSL
GLSL copied to clipboard
Disallow whole array operations for runtime-sized arrays?
There currently is no language in the GLSL spec disallowing whole array operations for runtime-sized arrays. For an example, see https://github.com/KhronosGroup/glslang/issues/2733.
SPIR-V virtually disallows these by disallowing an OpLoad of OpTypeRuntimearray. I presume that disallowing these in GLSL was an oversight.
Shall we proceed with creating a change to GLSL to disallow these?
@gnl21 Which working group do we need approval from?
Imagination's GLSL ES compiler rejects whole array operations that involve a runtime-sized array with a compilation error. I would be in favour of codifying this behaviour in the spec.
I think we primarily need approval from the GL working group, since GL implementations might have been accepting this (although we know that at least 2 weren't). It's scheduled to be discussed, so we should have an answer soon.
The working group agrees that this should not be allowed. I'll make a change to the GLSL spec and it will be published in the next revision.