glsl: Do not allow reads from write-only buffer variables
authorIago Toral Quiroga <itoral@igalia.com>
Tue, 28 Apr 2015 12:25:56 +0000 (14:25 +0200)
committerSamuel Iglesias Gonsalvez <siglesias@igalia.com>
Fri, 25 Sep 2015 06:39:23 +0000 (08:39 +0200)
commit0f18945cb612493d787377d8cbb138c18738f683
treed1dad9331f7331d0ca6d6d3c18dbd8a1a4c3ffd6
parent995a719499d4bd97b27f1e8c7b506202257007b6
glsl: Do not allow reads from write-only buffer variables

The error location won't be right, but fixing that would require to check
for this as we process each type of AST node that can involve a variable
read.

v2:
  - Limit the check to buffer variables, image variables have different
    semantics involved.

Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
src/glsl/ast_to_hir.cpp