glsl: Validate aux storage qualifier combination with other qualifiers.
authorChris Forbes <chrisf@ijw.co.nz>
Sat, 12 Apr 2014 01:21:09 +0000 (13:21 +1200)
committerChris Forbes <chrisf@ijw.co.nz>
Mon, 9 Jun 2014 22:09:31 +0000 (10:09 +1200)
commit5bbb028ef3626e51deea3fbd59578afcfc096c39
treee6c0811b37ab0a06cf9071641e23264c5ddf0985
parentc75f827f129dbb03e92200c9bfc3d82e02ea82f6
glsl: Validate aux storage qualifier combination with other qualifiers.

We've been allowing `centroid` and `sample` in all kinds of weird places
where they're not valid.

Insist that `sample` is combined with `in` or `out`;
and that `centroid` is combined with `in`, `out`, or the deprecated
`varying`.

V2: Validate this in a more sensible place. This does require an extra
case for uniform blocks members and struct members, though, since they
don't go through the normal path.

V3: Improve error message wording; eliminate redundant error generation
for inputs in VS or outputs in FS.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/glsl/ast_to_hir.cpp