glsl/ast: Forbid declaration of image variables in structures and uniform blocks.
authorFrancisco Jerez <currojerez@riseup.net>
Fri, 22 Nov 2013 23:17:05 +0000 (15:17 -0800)
committerFrancisco Jerez <currojerez@riseup.net>
Wed, 12 Feb 2014 17:44:05 +0000 (18:44 +0100)
commit2158749e522cb62d961d64d7b887cd730f915faa
treed93a908a80f2bcdfc55d525906965593b439d270
parent6b28528d1c206a9b0c962a1e35ed177db7818cfa
glsl/ast: Forbid declaration of image variables in structures and uniform blocks.

Aggregating images inside uniform blocks is explicitly disallowed by
the standard, aggregating them inside structures is not (as of GL
4.4), but there is a similar problem as with atomic counters: image
uniform declarations require either a "writeonly" memory qualifier or
an explicit format qualifier, which are explicitly forbidden in
structure member declarations.  In the resolution of Khronos bug
#10903 the same wording applied to atomic counters was decided to mean
that they're not allowed inside structures -- Rejecting image member
declarations within structures seems the most reasonable option for
now.

Reviewed-by: Paul Berry <stereotype441@gmail.com>
src/glsl/ast_to_hir.cpp