Where it differs from glslangValidator

tests/glslc runs both on the same shaders. glslc refuses at once what glslang only finds when it links (a function called and never defined, recursion, gl_FragColor with gl_FragData), and refuses a compute shader without a local size, as GLSL ES does, where glslang takes 1. It takes vertical tab and form feed as white space, as GLSL ES says, and layout(set) in 3.10, as glslang does only when it compiles for Vulkan. glslang has no GL_EXT_draw_buffers, and takes an array of arrays of samplers or images, writing a module spirv-val refuses for Vulkan. It lays a struct's samplers out as a UniformConstant struct, which Vulkan does not take, and with -R gives each element of an array of such structs variables of its own, so that an index known only when the shader runs, or a struct's array of samplers passed to a function, makes a module spirv-val refuses. glslang takes a precision before the storage qualifier after a layout (layout(binding = 1) highp uniform sampler2D s;), and glslc keeps GLSL ES's order of qualification there too: invariant, interpolation, centroid or sample, storage, precision.


Made from docs/layers/gpu/glslc.md at 69237645142c. GPL-3.0-or-later.