glsl: Fix inout qualifier handling in GLSL 4.40.
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 11 Aug 2016 18:40:25 +0000 (11:40 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Fri, 12 Aug 2016 06:56:40 +0000 (23:56 -0700)
commitdffa371665fc45481f6b6686e586f9be2b36a915
treedf295132752f2776c61936db66a45d1337e80467
parent17f1c49b9ad05af4f6482f6fa950e5dcc1a779d1
glsl: Fix inout qualifier handling in GLSL 4.40.

inout variables have q.in and q.out set.  We were trying to set
xfb_buffer = 1 for shader output variables (and inadvertantly setting
it on inout parameters, too).  But input_layout_mask doesn't have
xfb_buffer set, so it was seen as in invalid input qualifier.

This meant that all 'inout' parameters were broken.

Caught by running a WebGL conformance test in Chromium:
https://www.khronos.org/registry/webgl/sdk/tests/deqp/data/gles3/shaders/qualification_order.html?webglVersion=2

Fixes Piglit's tests/spec/glsl-4.40/compiler/inout-parameter-qualifier.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
src/compiler/glsl/ast_type.cpp