OSDN Git Service

glsl: be more strict when validating shader inputs
authorIlia Mirkin <imirkin@alum.mit.edu>
Fri, 13 May 2016 04:26:44 +0000 (00:26 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Fri, 13 May 2016 23:17:26 +0000 (19:17 -0400)
commit37c8f4c6098be6e256d0aef36b615d1747958114
treea7323283f7ab5b32f4f02854178a3e5975811c43
parent5239f1e0c9f24ca06a9c58ce6eea95c7e4da93bd
glsl: be more strict when validating shader inputs

interpolateAt* can only take input variables or an element of an input
variable array. No structs.

Further, GLSL 4.40 relaxes the requirement to allow swizzles, so enable
that as well.

This fixes the following dEQP tests:

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

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Chris Forbes <chrisforbes@google.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/compiler/glsl/ast_function.cpp