glsl: make sure that interpolateAt arguments are variables
authorIlia Mirkin <imirkin@alum.mit.edu>
Fri, 13 May 2016 03:54:36 +0000 (23:54 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Fri, 13 May 2016 23:17:26 +0000 (19:17 -0400)
commit5239f1e0c9f24ca06a9c58ce6eea95c7e4da93bd
treeb9ebbee775d5320e6b9f50bd8b3a075c5e7319a5
parent8f45f4f3cafa678292a87f316d2729da7800bab5
glsl: make sure that interpolateAt arguments are variables

In the case of a constant, it might have been propagated through and
variable_referenced() returns NULL. Error out in that case.

Fixes 3 dEQP tests:

dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_sample.negative.interpolate_constant
dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_centroid.negative.interpolate_constant
dEQP-GLES31.functional.shaders.multisample_interpolation.interpolate_at_offset.negative.interpolate_constant

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Eduardo Lima Mitev <elima@igalia.com>
Reviewed-by: Chris Forbes <chrisforbes@google.com>
src/compiler/glsl/ast_function.cpp